Namespace: ima

Classes

Enumerations

CompanionBackfillMode

constant   static

string

Defines a set of constants for the companion backfill setting. This setting indicates whether companions should be backfilled in various scenarios.

If the value is ALWAYS, companion backfill will be attempted in all situations, even when there is no master ad returned.

If the value is ON_MASTER_AD, companion backfill will be attempted if there is a master ad with fewer companions than there are companion slots. The missing companions will be backfilled.

The default value is ALWAYS.

Note that client-side companion backfill requires tagging your companions properly with a Google Publisher Tag (GPT). To enable backfill, the following changes to standard GPT setup are necessary:
...
let slot1 = googletag.defineSlot('/1234/adunit', [300, 250], 'slot-div');
slot1.addService(googletag.companionAds()).addService(googletag.pubads());
...
googletag.companionAds().setRefreshUnfilledSlots(true);
...
googletag.enableServices();
For autoplay videos, the following additional change is recommended to prevent companion slots from being preloaded and then immediately replaced with companions.
googletag.pubads().disableInitialLoad();
...
googletag.enableServices();

Value

ALWAYS

ON_MASTER_AD

OmidAccessMode

constant   static

string

Available access modes for OMID for Web, which control how much the verification script can access.

Value

LIMITED

The verification script is sandboxed and cannot access the creative or publisher page, and cannot directly confirm what publisher domain it is on.

DOMAIN

The verification script is sandboxed and cannot access the creative or publisher page. However, the script is loaded in such a way that it can directly confirm what publisher domain it is on.

FULL

The verification script has direct access to the creative and the publisher page.

UiElements

constant   static

string

Enum specifying different UI elements that can be configured to be displayed or hidden. These settings may be ignored for AdSense and ADX ads.

Value

AD_ATTRIBUTION

Displays the "Ad" text in the ad UI. Must be present to show the countdown timer.

COUNTDOWN

Ad attribution is required for a countdown timer to be displayed. Both google.ima.UiElements.COUNTDOWN and google.ima.UiElements.AD_ATTRIBUTION must be present in AdsRenderingSettings.uiElements.

ViewMode

constant   static

string

Enum specifying different VPAID view modes for ads.

Value

NORMAL

Normal ad view mode.

FULLSCREEN

Fullscreen ad view mode. Indicates to the ads manager that the publisher considers the current AdDisplayContainer arrangement as fullscreen (i.e. simulated fullscreen). This does not cause the ads manager to enter fullscreen.

Deprecated

VpaidMode

constant   static

number

A set of constants for enabling VPAID functionality.

Value

DISABLED

VPAID ads will not play and an error will be returned.

ENABLED

VPAID ads are enabled using a cross domain iframe. The VPAID ad cannot access the site. VPAID ads that depend on friendly iframe access may error. This is the default.

INSECURE

VPAID ads are enabled using a friendly iframe. This allows the ad access to the site via JavaScript.

Properties

CompanionBackfillMode

constant   static

string

Defines a set of constants for the companion backfill setting. This setting indicates whether companions should be backfilled in various scenarios.

If the value is ALWAYS, companion backfill will be attempted in all situations, even when there is no master ad returned.

If the value is ON_MASTER_AD, companion backfill will be attempted if there is a master ad with fewer companions than there are companion slots. The missing companions will be backfilled.

The default value is ALWAYS.

Note that client-side companion backfill requires tagging your companions properly with a Google Publisher Tag (GPT). To enable backfill, the following changes to standard GPT setup are necessary:
...
let slot1 = googletag.defineSlot('/1234/adunit', [300, 250], 'slot-div');
slot1.addService(googletag.companionAds()).addService(googletag.pubads());
...
googletag.companionAds().setRefreshUnfilledSlots(true);
...
googletag.enableServices();
For autoplay videos, the following additional change is recommended to prevent companion slots from being preloaded and then immediately replaced with companions.
googletag.pubads().disableInitialLoad();
...
googletag.enableServices();

Value

ALWAYS

ON_MASTER_AD

OmidAccessMode

constant   static

string

Available access modes for OMID for Web, which control how much the verification script can access.

Value

LIMITED

The verification script is sandboxed and cannot access the creative or publisher page, and cannot directly confirm what publisher domain it is on.

DOMAIN

The verification script is sandboxed and cannot access the creative or publisher page. However, the script is loaded in such a way that it can directly confirm what publisher domain it is on.

FULL

The verification script has direct access to the creative and the publisher page.

settings

constant   static

non-null ImaSdkSettings

The global singleton settings instance.

UiElements

constant   static

string

Enum specifying different UI elements that can be configured to be displayed or hidden. These settings may be ignored for AdSense and ADX ads.

Value

AD_ATTRIBUTION

Displays the "Ad" text in the ad UI. Must be present to show the countdown timer.

COUNTDOWN

Ad attribution is required for a countdown timer to be displayed. Both google.ima.UiElements.COUNTDOWN and google.ima.UiElements.AD_ATTRIBUTION must be present in AdsRenderingSettings.uiElements.

ViewMode

constant   static

string

Enum specifying different VPAID view modes for ads.

Value

NORMAL

Normal ad view mode.

FULLSCREEN

Fullscreen ad view mode. Indicates to the ads manager that the publisher considers the current AdDisplayContainer arrangement as fullscreen (i.e. simulated fullscreen). This does not cause the ads manager to enter fullscreen.

Deprecated

VpaidMode

constant   static

number

A set of constants for enabling VPAID functionality.

Value

DISABLED

VPAID ads will not play and an error will be returned.

ENABLED

VPAID ads are enabled using a cross domain iframe. The VPAID ad cannot access the site. VPAID ads that depend on friendly iframe access may error. This is the default.

INSECURE

VPAID ads are enabled using a friendly iframe. This allows the ad access to the site via JavaScript.