Skip to content

Instantly share code, notes, and snippets.

@g-ads-org
Created September 17, 2020 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g-ads-org/9b234d4ace1a654edf96ac6d51d53d16 to your computer and use it in GitHub Desktop.
Save g-ads-org/9b234d4ace1a654edf96ac6d51d53d16 to your computer and use it in GitHub Desktop.
function excludeLocationTarget() {
var campaignIterator = AdsApp.campaigns()
.get();
if (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
// https://developers.google.com/adwords/api/docs/appendix/geotargeting
campaign.excludeLocation(2826);
campaign.excludeLocation(2792);
campaign.excludeLocation(2040);
Logger.log("Turkey, Austria and Britania Excluded!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment