Can't query a smart campaign

42 views
Skip to first unread message

Alexander Ivanov ✔

unread,
Feb 18, 2020, 9:29:53 AM2/18/20
to Google Ads Scripts Forum
Hi!

I can be a little naive. Sorry.

I'm running the simple script with the simple query

function main() {
 
 
var query =
   
"SELECT CampaignName, Cost, CampaignStatus " +
   
"FROM CAMPAIGN_PERFORMANCE_REPORT"


 
var report = AdsApp.report(query);
 
var rows = report.rows();
 
var campagins = [];
 
while (rows.hasNext()) {
   
var row = rows.next();
    campagins
.push([row['CampaignName'], row['CampaignStatus']]);


 
}
 
Logger.log(campagins.length);
 
Logger.log(JSON.stringify(campagins, null, '\t'));
 
}

But I get the wrong number of campaigns.

The Logger returns 52 but the account has 55

1582035528910.png1582035700695.png


I know that the remaining three campaigns are paused  smart campaigns. If I count the cost, then I also get the cost without these three campaigns.


Also I can't set any label for these three campaigns.


What am I doing wrong?

These are some restrictions on the types of campaigns?


Best, Alex.


Alexander Ivanov ✔

unread,
Feb 18, 2020, 9:31:35 AM2/18/20
to Google Ads Scripts Forum
Right click opens the images fine.

Google Ads Scripts Forum Advisor

unread,
Feb 18, 2020, 2:18:35 PM2/18/20
to adwords-scripts+apn2wqe_ptcesfbm...@googlegroups.com, adwords-scripts+apn2wqe_ptcesfbm...@googlegroups.co, adwords...@googlegroups.com
Hi Alexander,

Smart campaigns can be accessed through reports. Can you please provide your CID so I can see which campaigns have been omitted from the report?

Thanks,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5001UV1Nwy:ref
Reply all
Reply to author
Forward
Message has been deleted
0 new messages