AdEngine Lazy-Loading of Ads

Overview

AdEngine supports the lazy loading of ads. Lazy-loading of an ad means that it will only be shown on the page when the user scrolls down to its placement. This behavior leads to better ad performance and a speedier page, ultimately improving ad CPM and user experience.

Lazy loading support needs to be enabled by your AM. Please get in contact before implementing any changes.

After activation of lazy loading, follow the standard implementation guide for implementing AdEngine. Ad units that are going to be lazy-loaded need to be declared in either the declarative configuration or through the startAuction command. To lazy-load an ad unit, use the AuctionLot structure with an additional field called lazyLoad set to true.

Setting the ad unit parameters

Through declarative configuration

When defining the activeLots to be auctioned by AdEngine, just add a new lazyLoad attribute for the given lot with a value of true.

window.snigelPubConf = adengine: { activeLots: [ {placement: "divId-0", adUnit: "adUnitName-0" }, {placement: "divId-1", adUnit: "adUnitName-1", lazyLoad: true}, {placement: "divId-2", adUnit: "adUnitName-2", lazyLoad: true}, ] }

In the example given above, the first lot ("divId-0", "adUnitName-0") will be normally auctioned, and the other two will be lazy-loaded.

Through startAuction() function

For the same example given above, the syntax should be as follows:

adngin.cmd.startAuction([ {placement: "divId-0", adUnit: "adUnitName-0" }, {placement: "divId-1", adUnit: "adUnitName-1", lazyLoad: true}, {placement: "divId-2", adUnit: "adUnitName-2", lazyLoad: true}, ]);

Description

Ad units configured to be lazy-loaded will only load when the user scrolls down the page. When the user hits a certain threshold before the ad gets visible, AdEngine will start an auction for that ad unit and will render the ad right before the user reaches the placement. This ensures that ads are only displayed when needed, avoiding unnecessary auctions and processing power to show an ad that may not be visible.

Notes

Lazy loading of ad units needs to have a declarative configuration in place or a manual call to startAuction with the array of lots to auction and/or lazy load. This means that running AdEngine in fully automated mode currently doesn't support the lazy loading of ad units.