- Resource: AdUnit
- AdUnitParent
- AdUnitStatus
- TargetWindow
- AdUnitSize
- 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 |
Optional. Immutable. A string used to uniquely identify the ad unit for the purposes of serving the ad. This attribute can be set during ad unit creation. If it is not provided, it will be assigned by Google based on 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 time this AdUnit was last modified. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. 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 attribute 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 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. 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 |
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. |