AI-generated Key Takeaways
-
The documentation defines two key enumerations:
CompanionBackfillMode
andVpaidMode
, both related to ad settings. -
CompanionBackfillMode
controls whether companion ads are backfilled, offering options forALWAYS
backfilling or onlyON_MASTER_AD
when there are missing companion ads compared to slots. -
VpaidMode
determines how VPAID ads are handled, with options forDISABLED
,ENABLED
using a cross-domain iframe, orINSECURE
with a friendly iframe that provides the ad with access to the site. -
Client-side companion backfill requires specific Google Publisher Tag (GPT) setup, including enabling
googletag.companionAds()
and settingsetRefreshUnfilledSlots(true)
.
Enumerations | |
---|---|
Companion
|
Defines a set of constants for the companion backfill setting. |
Vpaid
|
A set of constants for enabling VPAID functionality. |
Enumerations
CompanionBackfillMode
CompanionBackfillMode
If the value is ALWAYS
, companion backfill will be attempted in all
situations, even when there is no main ad returned.
If the value is ON_MASTER_AD
, companion backfill will be attempted if
there is a main ad with fewer companions than there are companion slots. The missing
companions will be backfilled.
The default value is ALWAYS
.
... let slot1 = googletag.defineSlot('/1234/adunit', [300, 250], 'slot-div'); slot1.addService(googletag.companionAds()).addService(googletag.pubads()); ... googletag.companionAds().setRefreshUnfilledSlots(true); ... googletag.enableServices();
googletag.pubads().disableInitialLoad(); ... googletag.enableServices();
Enumeration Members | |
---|---|
ALWAYS
|
|
ON_
|
VpaidMode
VpaidMode