AdsApp.search or report while iterating through accounts?

163 views
Skip to first unread message

Karl

unread,
Sep 26, 2022, 10:02:21 AM9/26/22
to Google Ads Scripts Forum
Hi,

Is it possible to pull data from accounts using search (or report?) while iterating through them?

Gave it a whirl (see screenshot), but only resulting in a list of undefined. Is this off limits or am I doing it wrong?

searchwhileAccountIterating.png

Help or pointers much appreciated!

Martijn Kraan

unread,
Sep 26, 2022, 4:39:15 PM9/26/22
to Google Ads Scripts Forum
Hi Karl,

Although I'm not part of the official Google Ads Scripts team, I might be able to help you.

Try this when declaring the campaignName variable:

    var campaignName = campaign.name;

Good luck!
Martijn

Karl

unread,
Oct 2, 2022, 7:37:28 AM10/2/22
to Google Ads Scripts Forum
Thank you!

Google Ads Scripts Forum Advisor

unread,
Oct 3, 2022, 3:13:22 AM10/3/22
to adwords...@googlegroups.com

Hello Karl,

I’m James from the Google Ads scripts support team. Thank you for contacting us.

I believe that the given suggestion by @Martjin is correct. Please do note that when accessing individual rows, it’s recommended that you utilize this `console.log(row)` to see how those data are represented as well as on how you can access it. This approach is recommended and applicable when using either AdsApp.Report or AdsApp.Search.

Regards,

Google Logo
James Howell
Google Ads Scripts Team
 


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