Resource: AdUnit
Representation of an ad unit. An ad unit represents a saved ad unit with a specific set of ad settings that have been customized within an account.
JSON representation |
---|
{ "name": string, "reportingDimensionId": string, "displayName": string, "state": enum ( |
Fields | |
---|---|
name |
Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit} |
reportingDimensionId |
Output only. Unique ID of the ad unit as used in the |
displayName |
Required. Display name of the ad unit, as provided when the ad unit was created. |
state |
Required. State of the ad unit. |
contentAdsSettings |
Required. Settings specific to content ads (AFC). |
State
State of an ad unit.
Enums | |
---|---|
STATE_UNSPECIFIED |
State unspecified. |
ACTIVE |
Ad unit has been activated by the user. |
ARCHIVED |
Ad unit has been archived by the user. Note that archived ad units are only removed from the default view in the UI. Archived ad units can still serve ads. |
ContentAdsSettings
Settings specific to content ads (AFC).
JSON representation |
---|
{
"size": string,
"type": enum ( |
Fields | |
---|---|
size |
Required. Size of the ad unit. e.g. "728x90", "1x3" (for responsive ad units). |
type |
Required. Type of the ad unit. |
Type
Content ads settings types supported by the api.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Unspecified ad unit type. |
DISPLAY |
Display ad unit. |
FEED |
In-feed ad unit. |
ARTICLE |
In-article ad unit. |
MATCHED_CONTENT |
Matched content unit. |
LINK |
Link ad unit. Note that link ad units have now been retired, see https://support.google.com/adsense/answer/9987221. |
Methods |
|
---|---|
|
Creates an ad unit. |
|
Gets an ad unit from a specified account and ad client. |
|
Gets the ad unit code for a given ad unit. |
|
Lists all ad units under a specified account and ad client. |
|
Lists all the custom channels available for an ad unit. |
|
Updates an ad unit. |