-
Notifications
You must be signed in to change notification settings - Fork 12
Javascript API Reference
-
refresh(string adUnit)
: Refresh a single ad unit. -
refreshAll()
: Refresh all ad units. -
lazyLoadAd(object args)
: Lazy-load an ad. See individual ad servers for object properties. -
debug()
: Enable debug mode.
-
lazyLoadAd(object args)
-
String
slotName
Required. The unique name for this ad slot. This is appended toadLayersDFP.adUnitPrefix
to form the ad div's ID. -
String
format
Optional. The ad unit to model in building this ad slot. This is what you configured in the WordPress Admin (and most likely, chose to not render on load).If this is provided,
path
,sizes
,targeting
, andsizeMapping
can all be derived from the ad slot data. However, if any of those is provided, it overrides the information pulled from the ad slot data. If this is absent, you must providepath
andsizes
, at a minimum. -
String
path
Optional. The ad slot path, e.g./6355419/Travel/Europe/France/Paris
. -
Array
sizes
Optional. The ad slot size(s), e.g.[300,250]
or[[300,250],[300x600]]
. -
Object
targeting
Optional.key
:value
targeting pairs passed tosetTargeting()
, e.g.{"test": ["infinitescroll"]}
-
Array
sizeMapping
Optional. Size mapping to pass todefineSizeMapping()
.
-