targeting Object
JSON object that defines the audience, contextual, keyword, and geographic targeting criteria for an ad group.
- keywords: Allows ads to be shown to users searching for relevant terms.
Note:Keyword targeting is not supported for Video campaigns.- keywordText (string,required): The search term.
- matchType (string,required): broad or exact.
Note:Excluded/negative keywords only support exact match.
- contextual: Places ads on pages relevant to specific product categories.
- id (integer,required): The contextual taxonomy node ID.
- reach(string,required):The contextual reach tier,mapped as tier_1 through tier_7 (possible values: tier_1, tier_2, tier_3, tier_4, tier_5, tier_6, tier_7)
This is how each tier maps to the representation on Ad Center UI:
low= [tier_1, tier_2],
mid= [tier_3, tier_4],
high= [tier_5, tier_6, tier_7] - behavioral:Reaches users based on previous shopping behavior,intent signals,or demographics.
- id (integer,required): The audience segment ID.
- audienceType (string,required): Type of audience (Possible values: retail, brand, persona, custom, demographic)
- attribute (string, required):Identifies the specific nature of the audience. Possible values:
- For retail(category): historical,predictive
- For brand: historical,predictive,lapsed_buyers
- For persona: lifestyle,lifestage, auto, shopping_habits,food_beverages
- For demographic: age, gender, household_income
- runOfSite: Allows the ad to run site-wide without specific behavioral or contextual constraints.
runOfSite (boolean,required): Set to true.
Note: If this is set, no other primary targeting types may be defined. - geoTargets: Restricts ad delivery to a specific geographic area. If omitted, will default to country(US). You cannot combine different geo-targeting types within a single ad group. Can be set to one of:
- Option A (Country): Omit geoTargets to target entire US
- Option B (State and City): Provide an id(integer) to target by State, City
- Option C (DMA): Provide an id (integer) to target by DMA
- Option D (Zip Codes): Provide a zipCode (string) to target specific US Zip Codes
Note: If targeting values are set at the ad group level,the forecast is based on the request values,not the original ad group settings.
- The Expression-Based Structure (Legacy):The Expression-Based Structure is the legacy structure,using nested logical operators . In this structure, the root must be an and array. Negative targeting (exclusions) must be wrapped inside a not array, which itself is nested inside the root and array
- The Flattened Structure (New):The Flattened Structure is the new flattened schema. Instead of requiring you to build complex logical trees (AND/NOT), you simply define arrays of items you want to include or exclude
Key Rules:
- You may define exactly one primary tactic: keywords, contextual, behavioral, or runOfSite
- You may optionally combine your primary tactic with geoTargets
Note:You must choose one structure; mixing flat and expression-based schemas in a single payload is not supported.
Reference targeting schema based on the schema:
runOfSite - Expression Structure
"targeting": { "and": [ { "runOfSite": true }, { "geoTargets": [ ... ] } ]
}runOfSite - Flattened Structure
"targeting": { "runOfSite": true , "geoTargets": { "include": [ ... ] }
}keywords - Expression Structure
{ "targeting": { "and": [ { "and": [ { "keywords": [ { "keywordText": "...", "matchType": "..." } ] }, { "not": [ { "keywords": [ { "keywordText": "...", "matchType": "..." } ] } ] } ] }, { "geoTargets": [ "..." ] } ] }
}keywords - Flattened Structure
"targeting": { "keywords": { "include": [ { "matchType": "...", "keywordText": "..." }, { "matchType": "...", "keywordText": "..." } ], "exclude": [ { "matchType": "...", "keywordText": "..." } ] }, "geoTargets": { "include": [ ... ] }
} behavioral - Expression Structure
"targeting": { "and": [ { "behavioral": [{ "id": ..., "audienceType": "...", "attribute": "..." }] }, { "geoTargets": [...] } ]
}behavioral - Flattened Structure
"targeting": { "behavioral": { "include": [{ "id": ..., "audienceType": "...", "attribute": "..." }], "exclude": [{ "id": ..., "audienceType": "...", "attribute": "..." }] } }, "geoTargets": { "include": [ ... ] }
} contextual - Expression Structure
"targeting": { "and": [ { "contextual": [{"id": ..., "reach": "..."}] }, { "geoTargets": [...] } ]
}contextual - Flattened Structure
"targeting": { "contextual": { "include": [{"id": ..., "reach": "..."}], "exclude": [{"id": ..., "reach": "..."}] } }, "geoTargets": { "include": [ ... ] }
} geoTargets using ID- Expression Structure
{ "geoTargets": [ { "id": ... } ] }
geoTargets using zipCode - Expression Structure
{ "geoTargets": [ { "zipCode": ... } ] }geoTargets using ID - Flattened Structure
using id: { "geoTargets": "include":[{ "id": ... },{ "id": ... }]
}
geoTargets using zipCode - Flattened Structure
{ "geoTargets": "include":[{ "zipCode": ... },{ "zipCode": ... }]
} Updated 7 days ago
