- Resource: AdUnit
- AdUnitParent
- AdUnitStatus
- TargetWindow
- AdUnitSize
- Size
- SizeType
- EnvironmentType
- LabelFrequencyCap
- FrequencyCap
- TimeUnit
- SmartSizeMode
- Methods
Resource: AdUnit
The AdUnit resource.
JSON representation |
---|
{ "name": string, "adUnitId": string, "parentAdUnit": string, "parentPath": [ { object ( |
Fields | |
---|---|
name |
Identifier. The resource name of the AdUnit. Format: |
adUnitId |
Output only. AdUnit ID. |
parentAdUnit |
Required. Immutable. The AdUnit's parent. Every ad unit has a parent except for the root ad unit, which is created by Google. Format: "networks/{networkCode}/adUnits/{adUnitId}" |
parentPath[] |
Output only. The path to this AdUnit in the ad unit hierarchy represented as a list from the root to this ad unit's parent. For root ad units, this list is empty. |
displayName |
Required. The display name of the ad unit. Its maximum length is 255 characters. |
adUnitCode |
Immutable. A string used to uniquely identify the ad unit for the purposes of serving the ad. This attribute is optional and can be set during ad unit creation. If it is not provided, it will be assigned by Google based off of the ad unit ID. |
status |
Output only. The status of this ad unit. It defaults to ACTIVE. |
appliedTargetWindow |
Optional. The target window directly applied to this AdUnit. If this field is not set, this AdUnit uses the target window specified in effectiveTargetWindow. |
effectiveTargetWindow |
Output only. Non-empty default. The target window of this AdUnit. This value is inherited from ancestor AdUnits and defaults to TOP if no AdUnit in the hierarchy specifies it. |
appliedTeams[] |
Optional. The resource names of Teams directly applied to this AdUnit. Format: "networks/{networkCode}/teams/{teamId}" |
teams[] |
Output only. The resource names of all Teams that this AdUnit is on as well as those inherited from parent AdUnits. Format: "networks/{networkCode}/teams/{teamId}" |
description |
Optional. A description of the ad unit. The maximum length is 65,535 characters. |
explicitlyTargeted |
Optional. If this field is set to true, then the AdUnit will not be implicitly targeted when its parent is. Traffickers must explicitly target such an AdUnit or else no line items will serve to it. This feature is only available for Ad Manager 360 accounts. |
hasChildren |
Output only. This field is set to true if the ad unit has any children. |
updateTime |
Output only. The instant this AdUnit was last modified. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
adUnitSizes[] |
Optional. The sizes that can be served inside this ad unit. |
externalSetTopBoxChannelId |
Optional. Determines what set top box video on demand channel this ad unit corresponds to in an external set top box ad campaign system. |
refreshDelay |
Optional. The duration after which an Ad Unit will automatically refresh. This is only valid for ad units in mobile apps. If not set, the ad unit will not refresh. A duration in seconds with up to nine fractional digits, ending with ' |
appliedLabels[] |
Optional. The set of labels applied directly to this ad unit. |
effectiveAppliedLabels[] |
Output only. Contains the set of labels applied directly to the ad unit as well as those inherited from the parent ad units. If a label has been negated, only the negated label is returned. This field is readonly and is assigned by Google. |
appliedLabelFrequencyCaps[] |
Optional. The set of label frequency caps applied directly to this ad unit. There is a limit of 10 label frequency caps per ad unit. |
effectiveLabelFrequencyCaps[] |
Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units. |
smartSizeMode |
Optional. The smart size mode for this ad unit. This attribute is optional and defaults to SmartSizeMode.NONE for fixed sizes. |
effectiveAdsenseEnabled |
Output only. Specifies whether or not the AdUnit is enabled for serving ads from the AdSense content network. This attribute defaults to the ad unit's parent or ancestor's setting if one has been set. If no ancestor of the ad unit has set appliedAdsenseEnabled, the attribute is defaulted to true. |
appliedAdsenseEnabled |
Optional. The value of AdSense enabled directly applied to this ad unit. This attribute is optional and if not specified this ad unit will inherit the value of effectiveAdsenseEnabled from its ancestors. |
AdUnitParent
The summary of a parent AdUnit.
JSON representation |
---|
{ "parentAdUnit": string, "displayName": string, "adUnitCode": string } |
Fields | |
---|---|
parentAdUnit |
Output only. The parent of the current AdUnit Format: |
displayName |
Output only. The display name of the parent AdUnit. |
adUnitCode |
Output only. A string used to uniquely identify the ad unit for the purposes of serving the ad. |
AdUnitStatus
The status of an AdUnit.
Enums | |
---|---|
AD_UNIT_STATUS_UNSPECIFIED |
Default value. This value is unused. |
ACTIVE |
The ad unit is active, available for targeting, and serving. |
INACTIVE |
The ad unit will be visible in the UI, but ignored by serving. |
ARCHIVED |
The ad unit will be hidden in the UI and ignored by serving. |
TargetWindow
Corresponds to an HTML link's target attribute. See http://www.w3.org/TR/html401/present/frames.html#adef-target
Enums | |
---|---|
TARGET_WINDOW_UNSPECIFIED |
Default value. This value is unused. |
TOP |
Specifies that the link should open in the full body of the page. |
BLANK |
Specifies that the link should open in a new window. |
AdUnitSize
Represents the size, environment, and companions of an ad in an ad unit.
JSON representation |
---|
{ "size": { object ( |
Fields | |
---|---|
size |
Required. The Size of the AdUnit. |
environmentType |
Required. The EnvironmentType of the AdUnit |
companions[] |
The companions for this ad unit size. Companions are only valid if the environment is |
Size
Represents the dimensions of an AdUnit, LineItem, or Creative.
JSON representation |
---|
{
"width": integer,
"height": integer,
"sizeType": enum ( |
Fields | |
---|---|
width |
|
height |
|
sizeType |
Required. The SizeType of the Creative, AdUnit, or LineItem. |
SizeType
The different Size types for an ad.
Enums | |
---|---|
SIZE_TYPE_UNSPECIFIED |
Default value. This value is unused. |
PIXEL |
Dimension based size, an actual height and width in pixels. |
ASPECT_RATIO |
Size is expressed as a ratio. For example, 4:1 could be met by a 100 x 25 sized image. |
INTERSTITIAL |
Out-of-page (Interstitial) size that is not related to the slot it is served. This must be used with 1x1 size. |
IGNORED |
Size is ignored. This must be used with 1x1 size. |
NATIVE |
Native size, which is a function of the how the client renders the creative. This must be used with 1x1 size. |
FLUID |
Fluid size. Automatically sizes the ad by filling the width of the enclosing column and adjusting the height as appropriate. This must be used with 1x1 size. |
AUDIO |
Audio size. Used with audio ads. This must be used with 1x1 size. |
EnvironmentType
The different environments in which an ad can be shown.
Enums | |
---|---|
ENVIRONMENT_TYPE_UNSPECIFIED |
No value specified |
BROWSER |
A regular web browser. |
VIDEO_PLAYER |
Video players. |
LabelFrequencyCap
Frequency cap using a label.
JSON representation |
---|
{
"label": string,
"frequencyCap": {
object ( |
Fields | |
---|---|
label |
Required. The label to used for frequency capping. Format: "networks/{networkCode}/labels/{labelId}" |
frequencyCap |
The frequency cap. |
FrequencyCap
Represents a Frequency Cap that can be applied to an entity.
JSON representation |
---|
{
"maxImpressions": string,
"timeAmount": string,
"timeUnit": enum ( |
Fields | |
---|---|
maxImpressions |
The maximum number of impressions for this frequency cap. |
timeAmount |
The number of time units over which the frequency cap is effective. |
timeUnit |
The units of time of this frequency cap. |
TimeUnit
Unit of time for the frequency cap.
Enums | |
---|---|
TIME_UNIT_UNSPECIFIED |
Default value. This value is unused. |
MINUTE |
Minute |
HOUR |
Hour |
DAY |
Day |
WEEK |
Week |
MONTH |
Month |
LIFETIME |
Lifetime |
POD |
Per pod of ads in a video stream. Only valid for entities in a VIDEO_PLAYER environment. |
STREAM |
Per video stream. Only valid for entities in a VIDEO_PLAYER environment. |
SmartSizeMode
The smart size mode for this ad unit. This attribute is optional and defaults to SmartSizeMode.NONE for fixed sizes.
Enums | |
---|---|
SMART_SIZE_MODE_UNSPECIFIED |
Default value. This value is unused. |
NONE |
Fixed size mode (default). |
SMART_BANNER |
The height is fixed for the request, the width is a range. |
DYNAMIC_SIZE |
Height and width are ranges. |
Methods |
|
---|---|
|
API to retrieve an AdUnit object. |
|
API to retrieve a list of AdUnit objects. |