-
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
slotNameRequired. The unique name for this ad slot. This is appended toadLayersDFP.adUnitPrefixto form the ad div's ID. -
String
formatOptional. 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, andsizeMappingcan 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 providepathandsizes, at a minimum. -
String
pathOptional. The ad slot path, e.g./6355419/Travel/Europe/France/Paris. -
Array
sizesOptional. The ad slot size(s), e.g.[300,250]or[[300,250],[300x600]]. -
Object
targetingOptional.key:valuetargeting pairs passed tosetTargeting(), e.g.{"test": ["infinitescroll"]} -
Array
sizeMappingOptional. Size mapping to pass todefineSizeMapping().
-