Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Overview

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

Follow the standard implementation guide for implementing AdEngine - if you want to use Lazy Load, please inform your AM before making any changes, as just a change in PubConfig is not enough to make it work. There is a separate activation needed on Snigel configuration side. Only after the lazy load option is active, is the ad units that are going to be lazy-loaded need to be declared in either the declarative configuration or through the startAuction command. For each, we need to use the AuctionLot structure with an additional field called lazyLoad. This means that for the declarative configuration, we need to set it through the field activeLots and through the startAuction() function using an array of AuctionLot.

Setting the adunit parameters

Through declarative configuration

When you are defining the activeLots to be auctioned in AdEngine, just add a new lazyLoad section 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

After configuring, AdEngine will add the lazy lot configurations to the batch of ad units that will be lazy-loaded. When the user scrolls down the page and hits the triggering thresholds for the given device and ad unit, the system starts a new auction for that ad unit and shows it on the page right before the user scrolls over the placement of the ad. This leads to showing the ad only when needed, avoiding unnecessary auctions and processing power to show an ad that may or may not be visualized.

Notes

Lazy loading of 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 allow to lazy load ad units.

  • No labels