Hi,
Thank you for reaching out to the Google Ads Scripts Support team.
I would like to inform you that Demand Gen campaigns are not yet supported in Google Ads Scripts. Currently we don't have any specific method available for Demand Gen campaigns like AdsApp.campaigns() or AdsApp.videoCampaigns(). We recommend you to please follow our
blog posts for future updates and announcements.
I would recommend you to use the
reporting option where you are able to get the campaign data related to the Demand Gen based on the campaign channel type. You can go through the below sample example used to get the data. Refer to the
reporting documentation to export the campaign data to a spreadsheet. In order to add additional fields you can go through the
Campaign query builder.
function main(){
let report = AdsApp.report(
"SELECT campaign.id, campaign.name, segments.ad_network_type FROM campaign WHERE campaign.advertising_channel_type = 'DEMAND_GEN' and segments.ad_network_type IN ('DISCOVER', 'GMAIL', 'MAPS', 'YOUTUBE')");
let rows = report.rows();
while (rows.hasNext()) {
let row = rows.next();
console.log(row);
}
}
