ShoppingCampaignSelector does not get all shopping campaigns

43 views
Skip to first unread message

Sam Higgins

unread,
Jun 19, 2020, 8:43:46 AM6/19/20
to Google Ads Scripts Forum
Every time I try to fetch all shopping campaigns using code below, it only returns 4 campaigns that are actually not enabled in the account.

function main() {   
  getShoppingCampaigns();
}

function getShoppingCampaigns(){ 
  var shoppingCampaignSelector = AdsApp
  .shoppingCampaigns();

  var shoppingCampaignIterator = shoppingCampaignSelector.get();

  while (shoppingCampaignIterator.hasNext()) {
    var shoppingCampaign = shoppingCampaignIterator.next();
    Logger.log(shoppingCampaign);
  }
}


What am I missing?


Google Ads Scripts Forum Advisor

unread,
Jun 19, 2020, 11:47:06 AM6/19/20
to adwords-scripts+apn2wqdutzdvkxpi...@googlegroups.com, adwords-scripts+apn2wqdutzdvkxpi...@googlegroups.co, adwords...@googlegroups.com
Hi Sam,

Can you please provide your CID and script name so we can look into the issue?

Please also note that smart shopping campaigns are not supported by scripts.

Thanks,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5004Q217pDO:ref

Sam Higgins

unread,
Jun 19, 2020, 12:56:47 PM6/19/20
to Google Ads Scripts Forum
Hi Matt

Thanks for your reply. Is it ok to post CID in here?

Also, figured out smart shopping wasn't supported but even so, was expecting more than 4 not enabled campaigns to be returned as there are 159 in total.

Thanks,
Sam

Google Ads Scripts Forum Advisor

unread,
Jun 19, 2020, 1:26:03 PM6/19/20
to adwords-scripts+apn2wqdutzdvkxpi...@googlegroups.com, adwords-scripts+apn2wqdutzdvkxpi...@googlegroups.co, adwords...@googlegroups.com
Hi Sam,

Please use the reply privately option. On the top right corner of this post, you will see a down arrow button which will drop down a menu containing 'Reply privately to author'. 
Reply all
Reply to author
Forward
0 new messages