Set Campaign Targeting
set_campaign_targetingSets geographic and language targeting on a campaign. locations: comma-separated location names or geo IDs (e.g. 'Türkiye' or 'İstanbul, Ankara' or '2792'). negative_locations: locations to exclude. languages: comma-separated language codes (tr, en, de...) or numeric IDs. mode='add' (default) KEEPS the campaign's existing targeting and only adds to it — targeting Ankara while Türkiye is still targeted does NOT narrow reach, Google takes the union. mode='replace' overwrites: every existing criterion of the dimensions you pass (positive locations if you pass locations, exclusions if you pass negative_locations, languages if you pass languages) is removed and replaced with your list, in a single request so the campaign is never left untargeted. Use replace to go from 'all of Türkiye' to 'only Ankara'. Other dimensions are untouched. A campaign without targeting targets the entire world. confirm=false → preview of the resolved locations + what would be removed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | add | |
| confirm | No | ||
| country | No | TR | |
| languages | No | ||
| locations | No | ||
| campaign_id | Yes | ||
| customer_id | Yes | ||
| negative_locations | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||