TargetingCriteria

Advertisers can target different attributes of an ad slot. For example, they can choose to show ads only if the user is in the U.S. Such targeting criteria can be specified as part of Shared Targeting.

JSON representation
{
  "key": string,
  "exclusions": [
    {
      object (TargetingValue)
    }
  ],
  "inclusions": [
    {
      object (TargetingValue)
    }
  ]
}
Fields
key

string

The key representing the shared targeting criterion. Targeting criteria defined by Google ad servers will begin with GOOG_. Third parties may define their own keys. A list of permissible keys along with the acceptable values will be provided as part of the external documentation.

exclusions[]

object (TargetingValue)

The list of values to exclude from targeting. Each value is AND'd together.

inclusions[]

object (TargetingValue)

The list of value to include as part of the targeting. Each value is OR'd together.

TargetingValue

A polymorphic targeting value used as part of Shared Targeting.

JSON representation
{

  // Union field value can be only one of the following:
  "longValue": string,
  "stringValue": string,
  "creativeSizeValue": {
    object (CreativeSize)
  },
  "dayPartTargetingValue": {
    object (DayPartTargeting)
  }
  // End of list of possible types for union field value.
}
Fields
Union field value. TargetingValue.value represents the actual value corresponding to the targeting specified as part of sharedTargeting (key->value pair). value can be only one of the following:
longValue

string (int64 format)

The long value to include/exclude.

stringValue

string

The string value to include/exclude.

creativeSizeValue

object (CreativeSize)

The creative size value to include/exclude. Filled in when key = GOOG_CREATIVE_SIZE

dayPartTargetingValue

object (DayPartTargeting)

The daypart targeting to include / exclude. Filled in when the key is GOOG_DAYPART_TARGETING. The definition of this targeting is derived from the structure used by Ad Manager.

CreativeSize

Specifies the size of the creative.

JSON representation
{
  "creativeSizeType": enum (CreativeSizeType),
  "size": {
    object (Size)
  },
  "companionSizes": [
    {
      object (Size)
    }
  ],
  "skippableAdType": enum (SkippableAdType),
  "nativeTemplate": enum (NativeTemplate),
  "allowedFormats": [
    enum (AllowedFormatType)
  ]
}
Fields
creativeSizeType

enum (CreativeSizeType)

The creative size type.

size

object (Size)

For regular or video creative size type, specifies the size of the creative

companionSizes[]

object (Size)

For video creatives specifies the sizes of companion ads (if present). Companion sizes may be filled in only when creativeSizeType = VIDEO

skippableAdType

enum (SkippableAdType)

The type of skippable ad for this creative. It will have a value only if creativeSizeType = CreativeSizeType.VIDEO.

nativeTemplate

enum (NativeTemplate)

Output only. The native template for this creative. It will have a value only if creativeSizeType = CreativeSizeType.NATIVE.

allowedFormats[]

enum (AllowedFormatType)

What formats are allowed by the publisher. If this repeated field is empty then all formats are allowed. For example, if this field contains AllowedFormatType.AUDIO then the publisher only allows an audio ad (without any video).

CreativeSizeType

Specifies the sizing type for a creative.

Enums
CREATIVE_SIZE_TYPE_UNSPECIFIED A placeholder for an undefined creative size type.
REGULAR The creative is a regular desktop creative.
INTERSTITIAL The creative is an interstitial creative.
VIDEO The creative is a video creative.
NATIVE The creative is a native (mobile) creative.

Size

Message depicting the size of the creative. The units of width and height depend on the type of the targeting.

JSON representation
{
  "width": integer,
  "height": integer
}
Fields
width

integer

The width of the creative

height

integer

The height of the creative.

SkippableAdType

The type of skippable ad this video creative is.

Enums
SKIPPABLE_AD_TYPE_UNSPECIFIED A placeholder for an undefined skippable ad type.
GENERIC This video ad can be skipped after 5 seconds.
INSTREAM_SELECT This video ad can be skipped after 5 seconds, and count as engaged view after 30 seconds. The creative is hosted on YouTube only, and viewcount of the YouTube video increments after the engaged view.
NOT_SKIPPABLE This video ad is not skippable.

NativeTemplate

The native template this native creative is linked to.

Enums
UNKNOWN_NATIVE_TEMPLATE A placeholder for an undefined native template.
NATIVE_CONTENT_AD The creative is linked to native content ad.
NATIVE_APP_INSTALL_AD The creative is linked to native app install ad.
NATIVE_VIDEO_CONTENT_AD The creative is linked to native video content ad.
NATIVE_VIDEO_APP_INSTALL_AD The creative is linked to native video app install ad.

AllowedFormatType

What formats are allowed by the publisher.

Enums
UNKNOWN A placeholder for an undefined allowed format.
AUDIO An audio-only ad (without any video).

DayPartTargeting

Specifies the day part targeting criteria.

JSON representation
{
  "timeZoneType": enum (TimeZoneSource),
  "dayParts": [
    {
      object (DayPart)
    }
  ]
}
Fields
timeZoneType

enum (TimeZoneSource)

The timezone to use for interpreting the day part targeting.

dayParts[]

object (DayPart)

A list of day part targeting criterion.

TimeZoneSource

Specifies the time zone type for day part targeting.

Enums
TIME_ZONE_SOURCE_UNSPECIFIED A placeholder for an undefined time zone source.
PUBLISHER Use publisher's time zone setting.
USER Use the user's time zone setting.

DayPart

Daypart targeting message that specifies if the ad can be shown only during certain parts of a day/week.

JSON representation
{
  "dayOfWeek": enum (DayOfWeek),
  "startTime": {
    object (TimeOfDay)
  },
  "endTime": {
    object (TimeOfDay)
  }
}
Fields
dayOfWeek

enum (DayOfWeek)

The day of the week to target. If unspecified, applicable to all days.

startTime

object (TimeOfDay)

The starting time of day for the ad to show (minute level granularity). The start time is inclusive. This field is not available for filtering in PQL queries.

endTime

object (TimeOfDay)

The ending time of the day for the ad to show (minute level granularity). The end time is exclusive. This field is not available for filtering in PQL queries.

DayOfWeek

Specifies the day of the week for day part targeting.

Enums
DAY_OF_WEEK_UNSPECIFIED A placeholder for when the day of the week is not specified.
MONDAY Monday
TUESDAY Tuesday
WEDNESDAY Wednesday
THURSDAY Thursday
FRIDAY Friday
SATURDAY Saturday
SUNDAY Sunday

TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

JSON representation
{
  "hours": integer,
  "minutes": integer,
  "seconds": integer,
  "nanos": integer
}
Fields
hours

integer

Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

minutes

integer

Minutes of hour of day. Must be from 0 to 59.

seconds

integer

Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

nanos

integer

Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.