Hi,
Thank you for reaching out to the Google Ads Scripts support team.
I would like to inform you that the function “campaign.excludeLocation(excludedLocationId)” expects an integer input. To resolve the error, I would suggest that you replace your code “var excludedLocationId = '2840';” with “var excludedLocationId = 2840;”.
I hope this helps! Kindly get back to us with the below details if you still face any issues.
- Google Ads account ID/CID
- Name of the affected script
You can share the requested details via
Reply privately to the author option or a
direct private reply to this email. If this option is not available on your end, you may send it through our email (
googleadsscr...@google.com) instead.
Thanks,
Google Ads Scripts team