google_ads_campaign_criterion
A campaign criterion is targeting that applies to a whole campaign: negative keywords (excluded across every ad group), geo targets (which locations your ads can show in), language targets, and proximity (latitude / longitude radius around a point).
Example
Block negative keywords campaign-wide:
resource "google_ads_campaign_criterion" "summer_negatives" { campaign = google_ads_campaign.summer_search.id status = "ENABLED"
negative_keyword { text = "free" match_type = "BROAD" }
negative_keyword { text = "diy" match_type = "BROAD" }
negative_keyword { text = "used" match_type = "BROAD" }}Target the United States (geo target constant 2840):
resource "google_ads_campaign_criterion" "summer_geo_us" { campaign = google_ads_campaign.summer_search.id status = "ENABLED"
location { geo_target_constant = "geoTargetConstants/2840" }}Target Polish-speaking users (language constant 1030):
resource "google_ads_campaign_criterion" "summer_lang_pl" { campaign = google_ads_campaign.summer_search.id status = "ENABLED"
language { language_constant = "languageConstants/1030" }}Show only within 15 km of central Warsaw:
resource "google_ads_campaign_criterion" "summer_warsaw" { campaign = google_ads_campaign.summer_search.id status = "ENABLED"
proximity { latitude = 52.229675 longitude = 21.012228 radius = 15 radius_units = "KILOMETERS" }}Schema
Required
-
campaign( Reference togoogle_ads_campaign)
Optional
-
status( String ) One of:ENABLED,PAUSED,REMOVED. -
negative( Boolean )
Nested blocks documented below: keyword, negative_keyword, location, language, proximity.
Nested blocks
keyword
A positive keyword scoped to the entire campaign. Uncommon — usually keywords live at ad-group scope. Use this only if you genuinely want a keyword to apply across every ad group.
Required
-
text( String ) -
match_type( String ) One of:EXACT,PHRASE,BROAD.
negative_keyword
A negative keyword that excludes searches campaign-wide. Repeat the
block to list many. The most common use of google_ads_campaign_criterion.
Required
-
text( String ) -
match_type( String ) One of:EXACT,PHRASE,BROAD.
location
A geo target — restricts where your ads can show. Use Google’s
geo target constants
(e.g. geoTargetConstants/2840 for the United States).
Required
-
geo_target_constant( String )
language
A language target — restricts what user-language settings can see your
ads. Use Google’s
language constants
(e.g. languageConstants/1030 for Polish, languageConstants/1000 for English).
Required
-
language_constant( String )
proximity
A circular radius target — ads only show to users within radius of
the given (latitude, longitude). Use for hyperlocal campaigns.
Required
-
latitude( Number ) -
longitude( Number ) -
radius( Number ) -
radius_units( String ) One of:MILES,KILOMETERS.
See also
google_ads_campaign— required parent.google_ads_ad_group_criterion— ad-group-scoped criteria.google_ads_shared_set— share negative lists across campaigns.