Google Ads: add location targets
set_geo_targetsADDS location criteria to a campaign; its existing locations stay.
This never replaces targeting: the locations and exclusions the campaign
already has are left as they are. Moving a campaign from country A to
country B therefore also needs A removed in Google Ads (Campaign →
Locations), which this server never does, so tell the user the old
location stays until they remove it there. A campaign with no location
criteria serves everywhere; the first location added narrows it.
Add locations to TARGET with `location_ids`, and/or locations to EXCLUDE with
`excluded_location_ids` (e.g. target India but exclude one city). Provide at
least one of the two.
Common location IDs (Google Ads geo target constants):
US=2840, UK=2826, Canada=2124, Australia=2036,
India=2356, Singapore=2702, UAE=2784,
Germany=2276, France=2250
Find more IDs at:
https://developers.google.com/google-ads/api/data/geotargets
Args:
customer_id: The Google Ads customer ID.
campaign_id: The ID of the campaign.
location_ids: Geo target constant IDs to TARGET. Optional.
excluded_location_ids: Geo target constant IDs to EXCLUDE. Optional.
Returns:
Dictionary with created location criteria.Tools revision: 5c9bea8f.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| customer_id | Yes | ||
| location_ids | No | ||
| excluded_location_ids | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |