Hello, 

I'm trying to get stats of the structured snippet extensions of my account 
with the script below but nothing is returned despite the fact that I have 
SSE with stats on all my campaigns.

What am I doing wrong?

function getSnippetStats() {
  var campaignIterator = AdWordsApp.campaigns()
        .get();
  if (campaignIterator.hasNext()) {
    var campaign = campaignIterator.next();
    var snippetsIterator = campaign.extensions().snippets().get();

    while (snippetsIterator.hasNext()) {
      var snippet = snippetsIterator.next();

      var stats = snippet.getStatsFor('LAST_MONTH');
      Logger.log(snippet.getHeader() + ', ' + stats.getClicks() + ', ' +
          stats.getImpressions());
    }
  }
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1868cbb0-5af9-47f7-86f1-6dcbeca2677a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Jean-Charles FABRE
    • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to