Google Ads script that excludes low ROAS location targets

40 views
Skip to first unread message

Adi S

unread,
May 20, 2025, 9:29:55 PM5/20/25
to Google Ads Scripts Forum
I need a Google Ads script that reviews any campaign that contains 'XXX' in the campaign name that excludes positive location targets from the same campaign where:

1. Clicks are greater than 49 and the conversion value / cost less is than 0.20 over the last 30 days

The reason I want this script is so that I can low ROAS locations automatically on a daily basis.

Adi S

unread,
May 20, 2025, 9:30:09 PM5/20/25
to Google Ads Scripts Forum

Google Ads Scripts Forum

unread,
May 21, 2025, 12:21:22 AM5/21/25
to Google Ads Scripts Forum
Hi,

Thank you for reaching out to the Google Ads Scripts Support team.

I would like to inform you that we cannot provide hands-on support in creating the scripts on the user's behalf. We can only support the technical queries/concerns related to Google Ads Scripts. As per your requirement you can refer to the campaign documentation to retrieve the data based on the campaign name and to exclude location targeting, you can refer to Excluded locations and Location sample examples for the implementation. In order to retrieve the metrics, I suggest you to use the stats method to get all the information related to clicks and conversions. Based on the above data you can set the ROAS by using the "setTargetRoas" method present under campaign bidding. For more information, you can also refer to the guides available for campaigns, stats, Exclude locations, locations.

Feel free to get back in case of any further queries.

Thanks,
Google Ads Scripts team

Reply all
Reply to author
Forward
0 new messages