Caution: You are viewing documentation for the API's REST interface. Most of our official client libraries use gRPC. See the REST Introduction for details.

REST Resource: customers.campaignCriteria

Resource: CampaignCriterion

A campaign criterion.

JSON representation
{
  "resourceName": string,
  "displayName": string,
  "type": enum (CriterionType),
  "status": enum (CampaignCriterionStatus),
  "campaign": string,
  "criterionId": string,
  "bidModifier": number,
  "negative": boolean,

  // Union field criterion can be only one of the following:
  "keyword": {
    object (KeywordInfo)
  },
  "placement": {
    object (PlacementInfo)
  },
  "mobileAppCategory": {
    object (MobileAppCategoryInfo)
  },
  "mobileApplication": {
    object (MobileApplicationInfo)
  },
  "location": {
    object (LocationInfo)
  },
  "device": {
    object (DeviceInfo)
  },
  "adSchedule": {
    object (AdScheduleInfo)
  },
  "ageRange": {
    object (AgeRangeInfo)
  },
  "gender": {
    object (GenderInfo)
  },
  "incomeRange": {
    object (IncomeRangeInfo)
  },
  "parentalStatus": {
    object (ParentalStatusInfo)
  },
  "userList": {
    object (UserListInfo)
  },
  "youtubeVideo": {
    object (YouTubeVideoInfo)
  },
  "youtubeChannel": {
    object (YouTubeChannelInfo)
  },
  "proximity": {
    object (ProximityInfo)
  },
  "topic": {
    object (TopicInfo)
  },
  "listingScope": {
    object (ListingScopeInfo)
  },
  "language": {
    object (LanguageInfo)
  },
  "ipBlock": {
    object (IpBlockInfo)
  },
  "contentLabel": {
    object (ContentLabelInfo)
  },
  "carrier": {
    object (CarrierInfo)
  },
  "userInterest": {
    object (UserInterestInfo)
  },
  "webpage": {
    object (WebpageInfo)
  },
  "operatingSystemVersion": {
    object (OperatingSystemVersionInfo)
  },
  "mobileDevice": {
    object (MobileDeviceInfo)
  },
  "locationGroup": {
    object (LocationGroupInfo)
  },
  "customAffinity": {
    object (CustomAffinityInfo)
  },
  "customAudience": {
    object (CustomAudienceInfo)
  },
  "combinedAudience": {
    object (CombinedAudienceInfo)
  }
  // End of list of possible types for union field criterion.
}
Fields
resourceName

string

Immutable. The resource name of the campaign criterion. Campaign criterion resource names have the form:

customers/{customerId}/campaignCriteria/{campaignId}~{criterionId}

displayName

string

Output only. The display name of the criterion.

This field is ignored for mutates.

type

enum (CriterionType)

Output only. The type of the criterion.

status

enum (CampaignCriterionStatus)

The status of the criterion.

campaign

string

Immutable. The campaign to which the criterion belongs.

criterionId

string (int64 format)

Output only. The ID of the criterion.

This field is ignored during mutate.

bidModifier

number

The modifier for the bids when the criterion matches. The modifier must be in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. Use 0 to opt out of a Device type.

negative

boolean

Immutable. Whether to target (false) or exclude (true) the criterion.

Union field criterion. The campaign criterion.

Exactly one must be set. criterion can be only one of the following:

keyword

object (KeywordInfo)

Immutable. Keyword.

placement

object (PlacementInfo)

Immutable. Placement.

mobileAppCategory

object (MobileAppCategoryInfo)

Immutable. Mobile app category.

mobileApplication

object (MobileApplicationInfo)

Immutable. Mobile application.

location

object (LocationInfo)

Immutable. Location.

device

object (DeviceInfo)

Immutable. Device.

adSchedule

object (AdScheduleInfo)

Immutable. Ad Schedule.

ageRange

object (AgeRangeInfo)

Immutable. Age range.

gender

object (GenderInfo)

Immutable. Gender.

incomeRange

object (IncomeRangeInfo)

Immutable. Income range.

parentalStatus

object (ParentalStatusInfo)

Immutable. Parental status.

userList

object (UserListInfo)

Immutable. User List.

youtubeVideo

object (YouTubeVideoInfo)

Immutable. YouTube Video.

youtubeChannel

object (YouTubeChannelInfo)

Immutable. YouTube Channel.

proximity

object (ProximityInfo)

Immutable. Proximity.

topic

object (TopicInfo)

Immutable. Topic.

listingScope

object (ListingScopeInfo)

Immutable. Listing scope.

language

object (LanguageInfo)

Immutable. Language.

ipBlock

object (IpBlockInfo)

Immutable. IpBlock.

contentLabel

object (ContentLabelInfo)

Immutable. ContentLabel.

carrier

object (CarrierInfo)

Immutable. Carrier.

userInterest

object (UserInterestInfo)

Immutable. User Interest.

webpage

object (WebpageInfo)

Immutable. Webpage.

operatingSystemVersion

object (OperatingSystemVersionInfo)

Immutable. Operating system version.

mobileDevice

object (MobileDeviceInfo)

Immutable. Mobile Device.

locationGroup

object (LocationGroupInfo)

Immutable. Location Group

customAffinity

object (CustomAffinityInfo)

Immutable. Custom Affinity.

customAudience

object (CustomAudienceInfo)

Immutable. Custom Audience

combinedAudience

object (CombinedAudienceInfo)

Immutable. Combined Audience.

CampaignCriterionStatus

The possible statuses of a CampaignCriterion.

Enums
UNSPECIFIED No value has been specified.
UNKNOWN

The received value is not known in this version.

This is a response-only value.

ENABLED The campaign criterion is enabled.
PAUSED The campaign criterion is paused.
REMOVED The campaign criterion is removed.

LocationInfo

A location criterion.

JSON representation
{
  "geoTargetConstant": string
}
Fields
geoTargetConstant

string

The geo target constant resource name.

ProximityInfo

A Proximity criterion. The geo point and radius determine what geographical area is included. The address is a description of the geo point that does not affect ad serving.

There are two ways to create a proximity. First, by setting an address and radius. The geo point will be automatically computed. Second, by setting a geo point and radius. The address is an optional label that won't be validated.

JSON representation
{
  "geoPoint": {
    object (GeoPointInfo)
  },
  "radiusUnits": enum (ProximityRadiusUnits),
  "address": {
    object (AddressInfo)
  },
  "radius": number
}
Fields
geoPoint

object (GeoPointInfo)

Latitude and longitude.

radiusUnits

enum (ProximityRadiusUnits)

The unit of measurement of the radius. Default is KILOMETERS.

address

object (AddressInfo)

Full address.

radius

number

The radius of the proximity.

GeoPointInfo

Geo point for proximity criterion.

JSON representation
{
  "longitudeInMicroDegrees": integer,
  "latitudeInMicroDegrees": integer
}
Fields
longitudeInMicroDegrees

integer

Micro degrees for the longitude.

latitudeInMicroDegrees

integer

Micro degrees for the latitude.

ProximityRadiusUnits

The unit of radius distance in proximity (e.g. MILES)

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
MILES Miles
KILOMETERS Kilometers

AddressInfo

Address for proximity criterion.

JSON representation
{
  "postalCode": string,
  "provinceCode": string,
  "countryCode": string,
  "provinceName": string,
  "streetAddress": string,
  "streetAddress2": string,
  "cityName": string
}
Fields
postalCode

string

Postal code.

provinceCode

string

Province or state code.

countryCode

string

Country code.

provinceName

string

Province or state name.

streetAddress

string

Street address line 1.

streetAddress2

string

Street address line 2. This field is write-only. It is only used for calculating the longitude and latitude of an address when geoPoint is empty.

cityName

string

Name of the city.

ListingScopeInfo

A listing scope criterion.

JSON representation
{
  "dimensions": [
    {
      object (ListingDimensionInfo)
    }
  ]
}
Fields
dimensions[]

object (ListingDimensionInfo)

Scope of the campaign criterion.

LanguageInfo

A language criterion.

JSON representation
{
  "languageConstant": string
}
Fields
languageConstant

string

The language constant resource name.

IpBlockInfo

An IpBlock criterion used for IP exclusions. We allow: - IPv4 and IPv6 addresses - individual addresses (192.168.0.1) - masks for individual addresses (192.168.0.1/32) - masks for Class C networks (192.168.0.1/24)

JSON representation
{
  "ipAddress": string
}
Fields
ipAddress

string

The IP address of this IP block.

CarrierInfo

Represents a Carrier Criterion.

JSON representation
{
  "carrierConstant": string
}
Fields
carrierConstant

string

The Carrier constant resource name.

OperatingSystemVersionInfo

Represents an operating system version to be targeted.

JSON representation
{
  "operatingSystemVersionConstant": string
}
Fields
operatingSystemVersionConstant

string

The operating system version constant resource name.

MobileDeviceInfo

A mobile device criterion.

JSON representation
{
  "mobileDeviceConstant": string
}
Fields
mobileDeviceConstant

string

The mobile device constant resource name.

LocationGroupInfo

A radius around a list of locations specified via a feed.

JSON representation
{
  "geoTargetConstants": [
    string
  ],
  "radiusUnits": enum (LocationGroupRadiusUnits),
  "feedItemSets": [
    string
  ],
  "feed": string,
  "radius": string
}
Fields
geoTargetConstants[]

string

Geo target constant(s) restricting the scope of the geographic area within the feed. Currently only one geo target constant is allowed.

radiusUnits

enum (LocationGroupRadiusUnits)

Unit of the radius. Miles and meters are supported for geo target constants. Milli miles and meters are supported for feed item sets. This is required and must be set in CREATE operations.

feedItemSets[]

string

FeedItemSets whose FeedItems are targeted. If multiple IDs are specified, then all items that appear in at least one set are targeted. This field cannot be used with geoTargetConstants. This is optional and can only be set in CREATE operations.

feed

string

Feed specifying locations for targeting. This is required and must be set in CREATE operations.

radius

string (int64 format)

Distance in units specifying the radius around targeted locations. This is required and must be set in CREATE operations.

LocationGroupRadiusUnits

The unit of radius distance in location group (e.g. MILES)

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
METERS Meters
MILES Miles
MILLI_MILES Milli Miles

Methods

get

Returns the requested criterion in full detail.

mutate

Creates, updates, or removes criteria.