The CampaignCriterionService and AdGroupCriterionService support targeting or excluding various types of criteria.
Campaign criteria
The CampaignCriterionService lets you specify targeting at the campaign level for the types below. You can also specify bid modifiers at this level using a multiplier, but you cannot set absolute bids.
- AdScheduleInfo
By default a new campaign will contain no ad schedules, meaning that ads will run for all time periods. You can set up an ad schedule, down to a quarter of an hour, to determine more precisely when to run your ads.
You can only target ad schedules. Exclusion is not supported.
- AgeRangeInfo
By default a new campaign will contain no age range criteria, which means that all ages are included.
- CarrierInfo
By default a new campaign will contain no content carrier criteria, which means all carriers are included. Only positive criteria are supported at the campaign level.
- CombinedAudienceInfo
Any number of Audience criteria can be combined in a combined audience. By default new campaigns do not contain any combined audiences. For more details see the Help Center article about combined audiences.
- ContentLabelInfo
By default a new campaign will contain no content label criteria, which means all categories are included. Only negative criteria are supported at the campaign level.
- CustomAffinityInfo
By default a new campaign will contain no custom affinity criteria. Custom affinity criteria are defined by CustomInterest resources that must be created by the user. Only positive criteria are supported. This article contains more details about how custom affinity criteria work and how to use them.
- DeviceInfo
Define
DeviceInfo
criteria using one of the predefined Device enums. The main use case for device targeting is to adjust bids for a specific device using thebid_modifier
value of CampaignCriterion.You can only target devices. Exclusion is not supported.
DeviceInfo
is the equivalent of Platform in the AdWords API.- GenderInfo
By default a new campaign will contain no gender criteria, which means that all genders are included. Only negative criteria are supported at the campaign level.
- IncomeRangeInfo
By default a new campaign will contain no income range criteria, which means that all incomes are included. Only negative criteria are supported at the campaign level.
- IpBlockInfo
By default a new campaign will not contain IP blocking criteria, which means everything is included.
- KeywordInfo
Keywords are created using free-form text and one of the match type enum values.
You can only exclude keywords at the campaign level, so you must specify
negative = true
on a keyword's CampaignCriterion.- LanguageInfo
By default a new campaign will not contain language criteria, which means all languages are included. Only positive criteria are supported.
- ListingScopeInfo
By default a new campaign will not contain listing scope criteria. Only positive criteria are supported.
ListingScopeInfo
is the equivalent of ProductScope in the AdWords API.- LocationInfo
Named location targeting is implemented as
LocationInfo
and are created using a fixed set of criteria IDs. The available IDs are listed in the documentation and can be individually searched for using theGeoTargetConstantService
. These criteria can be configured as either positive or negative, with negative targets overriding positive ones. By default a new campaign will contain no location criteria, which means that all locations are targeted.Learn more about Named location targeting.
- LocationGroupInfo
A
LocationGroup
lets campaigns target multiple geographic regions. These regions are defined by a set of locations and a distance radius around each location in either meters or miles. The set of locations is derived from the location extensions for the campaign. You can optionally use aFeed
to define the set of locations. The targeting of these locations can be filtered using a list of geotargeting criteria IDs.Learn more about targeting multiple geographic regions.
- MobileAppCategoryInfo
By default a new campaign will not contain mobile app category criteria, which means all categories are included. Only negative criteria at the campaign level are supported.
- MobileApplicationInfo
By default a new ad group will not contain mobile app criteria. Individual mobile apps must be identified according to the value of the
app_id
field.- MobileDeviceInfo
By default a new campaign will not contain mobile device criteria, which means that all devices are included.
To specify an individual mobile device you must use the resource name of a MobileDeviceConstant to set the
device
field on campaign criteria.You can only target mobile devices. Exclusion is not supported.
MobileDeviceInfo
is the equivalent of MobileDevice in the AdWords API.- OperatingSystemVersionInfo
By default a new campaign will contain no operating system version criteria, which means that all operating systems are targeted. Only positive criteria are supported at the campaign level.
- ParentalStatusInfo
By default a new campaign will contain no parental status criteria, which means that all parental status categories are included. Only negative criteria are supported at the campaign level.
- PlacementInfo
These are created using a customer URL. There are limits on the length (250 characters) and depth (2 levels) of the URLs used. They can only be configured as negative, and by default a new campaign will not contain placement criteria. Negative placements with a URL of exactly
adsenseformobileapps.com
are not allowed.- ProximityInfo
Radius targets are implemented as ProximityInfo criteria. They can be created using either an address or latitude/longitude, and by specifying a radius. They can only be configured as positive, and by default a new campaign will not contain proximity criteria.
Learn more about Radius targeting.
- TopicInfo
By default a new campaign will not contain topic criteria. Only negative criteria are supported at the campaign level.
- UserInterestInfo
By default a new campaign will not contain user interest criteria. Only negative criteria are supported at the campaign level.
When retrieving
UserInterest
to set inUserInterestInfo
, verify theavailabilities[]
are compatible with the campaign type. SomeUserInterest
options are only available for specific campaign types.- UserListInfo
By default a new campaign will not contain user lists criteria. Use the ID of the user list to identify the user list in the criterion. Positive and negative criteria are supported at the campaign level.
- WebpageInfo
By default a new campaign will not contain webpage criteria, which means all webpages are included. Only negative criteria at the campaign level are supported.
- YouTubeChannelInfo
By default a new campaign will not contain YouTube channel criteria. Only negative criteria are supported at the campaign level.
- YouTubeVideoInfo
By default a new campaign will not contain YouTube video criteria. Only negative criteria are supported at the campaign level.
Ad group criteria
The AdGroupCriterionService let you specify targeting at the ad group level for the types below.
- AgeRangeInfo
- By default a new campaign will contain no age range criteria, which means that all ages are included. At the ad group level, you can bid on or exclude age ranges.
- AppPaymentModelInfo
- At the ad group level, you can only target app payment model criteria.
- CombinedAudienceInfo
- Any number of Audience criteria can be combined in a combined audience. By default new ad groups do not contain any combined audiences. For more details see the Help Center article about combined audiences.
- CustomAffinityInfo
- By default a new ad group will contain no custom affinity criteria. Custom affinity criteria are defined by CustomInterest resources that must be created by the user. Only positive criteria are supported.This article contains more details about how custom affinity criteria work and how to use them.
- CustomIntentInfo
- By default a new campaign will not contain custom intent criteria. Custom intent criteria are defined by CustomInterest resources that must be created by the user. Only positive criteria are supported. This article contains more information about how custom intent criteria work and how to use them.
- GenderInfo
- By default a new campaign will contain no gender criteria, which means that all genders are included. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude genders.
- IncomeRangeInfo
- By default a new campaign will contain no income range criteria, which means that all incomes are included. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude income ranges.
- KeywordInfo
- At the ad group level, you can either target or exclude keywords.
- ListingGroupInfo
Listing groups define a tree-based structure of criteria for Hotel Ads and Shopping campaigns.
ListingGroupInfo
is the equivalent of ProductPartition in the AdWords API.- MobileAppCategoryInfo
At the ad group level, you can either target or exclude mobile app category criteria.
- MobileApplicationInfo
By default a new ad group will not contain mobile app criteria. Individual mobile apps must be identified according to the value of the
app_id
field.- ParentalStatusInfo
By default a new campaign will contain no parental status criteria, which means that all parental status categories are included. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude parental status categories.
- PlacementInfo
These are created using a customer URL. There are limits on the length (250 characters) and depth (2 levels) of the URLs used. They can only be configured as negative, and by default a new campaign will not contain placement criteria. Negative placements with a URL of exactly
adsenseformobileapps.com
are not allowed.- TopicInfo
By default a new campaign will not contain topic criteria. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude income ranges.
- UserInterestInfo
By default a new campaign will not contain user interest criteria. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude user interests.
When retrieving
UserInterest
to set inUserInterestInfo
, verify theavailabilities[]
are compatible with the campaign type. SomeUserInterest
options are only available for specific campaign types.- UserListInfo
By default a new campaign will not contain user lists criteria. Use the ID of the user list to identify the user list in the criterion. Positive and negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude user lists.
- WebpageInfo
At the ad group level, you can either target or exclude webpage criteria.
- YouTubeChannelInfo
At the ad group level, you can either target or exclude YouTube channel criteria.
- YouTubeVideoInfo
At the ad group level, you can either target or exclude YouTube video criteria.