Campaign performance report not showing values

12 views
Skip to first unread message

Lucas Ertola

unread,
Dec 9, 2016, 4:13:58 AM12/9/16
to AdWords API Forum
Hi
Any idea why this code that is taken from the Code Snippets or Example's section is not showing me any report on the Log section when I run the script?

Code:
function main() {
function runReport() {


 
var report = AdWordsApp.report(
     
'SELECT CampaignName, Clicks, Impressions, Cost ' +
     
'FROM   CAMPAIGN_PERFORMANCE_REPORT ' +
     
'DURING LAST_30_DAYS');


 
var rows = report.rows();
 
while (rows.hasNext()) {
   
var row = rows.next();
   
var campaignName = row['CampaignName'];
   
var clicks = row['Clicks'];
   
var impressions = row['Impressions'];
   
var cost = row['Cost'];
   
Logger.log(campaignName + ',' + clicks + ',' + impressions + ',' + cost);
 
}
}


}

Result:





Anthony Madrigal

unread,
Dec 9, 2016, 8:52:39 AM12/9/16
to AdWords API Forum
Hi Lucas,

Since this question is related to AdWords Scripts, instead of AdWords API, I recommend posting your question on their forum so that they could help you out.

Regards,
Anthony
AdWords API Team

Lucas Ertola

unread,
Dec 9, 2016, 8:57:45 AM12/9/16
to AdWords API Forum
Thanks Anthony! I wasn't aware of it! I've already posted my question on the other forum.
Regards
Reply all
Reply to author
Forward
0 new messages