You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matthew Boynes edited this page Jan 18, 2016
·
1 revision
AdLayersAPI
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.
AdLayersDFPAPI
lazyLoadAd(object args)
String slotNameRequired. The unique name for this ad slot. This is appended to adLayersDFP.adUnitPrefix to 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, and sizeMapping 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 provide path and sizes, 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: value targeting pairs passed to setTargeting(), e.g. {"test": ["infinitescroll"]}
Array sizeMappingOptional. Size mapping to pass to defineSizeMapping().