CampaignIteraror not selecting all campaigns

14 views
Skip to first unread message

sshr...@keplergrp.com

unread,
Nov 19, 2018, 11:00:28 PM11/19/18
to AdWords API and Google Ads API Forum
Hi,

I am running a very basic script to get all the campaigns, however, the script is only giving me 44 campaigns and all of them are paused. I am not able to figure out why. For context, my account has 258 campaigns of which 45 are actives. The script is not even giving us all paused campaigns, it is just showing some paused campaigns. I tried running it on multiple accounts, but it does not work.

function main() {
  var campaignIterator = AdWordsApp.campaigns().get();
  Logger.log('Total campaigns found : ' +
      campaignIterator.totalNumEntities());
  while (campaignIterator.hasNext()) {
    var campaign = campaignIterator.next();
    Logger.log(campaign.getName());
  }
}

Luis Xander Talag (AdWords API Team)

unread,
Nov 20, 2018, 1:04:47 AM11/20/18
to AdWords API and Google Ads API Forum
Hi,

My apologies as we can only provide support to issues/concerns related to AdWords API. Since your concern is specific to AdWords Scripts, I would recommend that you post your concern in the AdWords Scripts Forum.

Best regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages