Skip to main content

adunits

Overview

Nameadunits
TypeResource
Idgoogleads.adsense.adunits

Fields

NameDatatypeDescription
namestringOutput only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
reportingDimensionIdstringOutput only. Unique ID of the ad unit as used in the AD_UNIT_ID reporting dimension.
statestringState of the ad unit.
contentAdsSettingsobjectSettings specific to content ads (AFC).
displayNamestringRequired. Display name of the ad unit, as provided when the ad unit was created.

Methods

NameAccessible byRequired ParamsDescription
accounts_adclients_adunits_getSELECTaccountsId, adclientsId, adunitsIdGets an ad unit from a specified account and ad client.
accounts_adclients_adunits_listSELECTaccountsId, adclientsIdLists all ad units under a specified account and ad client.
accounts_adclients_adunits_createINSERTaccountsId, adclientsIdCreates an ad unit. This method can only be used by projects enabled for the AdSense for Platforms product. Note that ad units can only be created for ad clients with an "AFC" product code. For more info see the AdClient resource. For now, this method can only be used to create DISPLAY ad units. See: https://support.google.com/adsense/answer/9183566
accounts_adclients_adunits_patchEXECaccountsId, adclientsId, adunitsIdUpdates an ad unit. This method can only be used by projects enabled for the AdSense for Platforms product. For now, this method can only be used to update DISPLAY ad units. See: https://support.google.com/adsense/answer/9183566