Help with Search Query Report Script

23 views
Skip to first unread message

Omar Ajmeri

unread,
Aug 17, 2022, 11:45:57 AM8/17/22
to Google Ads Scripts Forum
Hi All,

I'm attempting to write a script to produce keywords that have a higher conversion value than cost, and I'm running into some trouble. I'm using this as a reference, but I can't seem to get it to run - any help would be appreciated!

function main(){
var report = AdsApp.report(
   "SELECT Query " +
   " FROM SEARCH_QUERY_PERFORMANCE_REPORT " +
   " WHERE Cost > 100" +
   " DURING LAST_7_DAYS");
var rows = report.rows();
console.log(rows);
};


Google Ads Scripts Forum Advisor

unread,
Aug 17, 2022, 4:05:13 PM8/17/22
to adwords...@googlegroups.com
Hi Omar,

Thanks for reaching out. The rows object in your code, is an iterator, so logging the object will not log the actual row data. Please see this reporting example that demonstrates how to loop through the row iterator. 

Regards,

Google Logo
Matt
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2dLeJW:ref
Reply all
Reply to author
Forward
0 new messages