Async for Google Ad Scripts in Google Ad Platform?

13 views
Skip to first unread message

Joseph Lindsay

unread,
Jun 23, 2022, 2:49:35 AM6/23/22
to Google Ads Scripts Forum
How can I support async functionality for Google Ad Scripts in the Google Ad Platform?

async function () {}

The above function is not async.

Peter Valenta

unread,
Jun 29, 2022, 6:39:43 PM6/29/22
to Google Ads Scripts Forum
No async is not supported.

executeInParallel is the only function that comes close to async. It allows you to run code accross multiple accounts in parallell.

https://developers.google.com/google-ads/scripts/docs/reference/adsmanagerapp/adsmanagerapp_managedaccountselector#executeInParallel_2

Google Ads Scripts Forum Advisor

unread,
Jun 30, 2022, 12:09:21 AM6/30/22
to adwords...@googlegroups.com

Hi All,

 

This is Yasmin from the Google Ads Scripts team. Thank you, Peter, for sharing your knowledge with the community.

 

To add further to Peter's response, the method executeInParallel can operate simultaneously on up to 50 accounts. If the selector contains more than 50 accounts, an exception is thrown and no accounts are processed. You can limit the number of accounts for the executeInParallel method using accountSelector.withLimit(accountLimit).

 

@Joseph - With that being said, however, can you please provide more context to what you are trying to achieve so we can properly address your concern?

 

Regards,

 

Google Logo
Yasmin Gabrielle
Google Ads Scripts Team
 


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