AI-generated Key Takeaways
-
AdUnitSize
defines the dimensions of an ad within an ad unit, encompassing its width, height, and potential aspect ratio. -
It also specifies the ad's environment (browser or video player) and any associated companion ads, which are only applicable to video player environments.
-
An
AdUnitSize
object includes fields for creative size, environment type, companions, a full display string, and an audio indicator. -
When marked as audio, the size is automatically set to "1x1" and the environment type to "VIDEO_PLAYER," overriding any user inputs for these fields.
An AdUnitSize
represents the size of an ad in an ad unit. This also represents the
environment and companions of a particular ad in an ad unit. In most cases, it is a simple size
with just a width and a height (sometimes representing an aspect ratio).
- Namespace
-
https://www.google.com/apis/ads/publisher/v202411
Field |
|
---|---|
|
The permissible creative size that can be served inside this ad unit. |
|
The environment type of the ad unit size. The default value is EnvironmentType.BROWSER. Enumerations
|
|
The companions for this ad unit size. Companions are only valid if the environment is EnvironmentType.VIDEO_PLAYER. If the environment is EnvironmentType.BROWSER including companions results in an error. |
|
The full (including companion sizes, if applicable) display string of the size, e.g. |
|
Whether the inventory size is audio. If set to true, |