Lazy loading
Last edited: 2024/05/16
Lazy loading pauses requesting and rendering ads until they approach the user's viewport.
What are the benefits of using lazyload?
Without lazy loading, the website is programmed to load the entire web page including all ad-units, as soon as a user arrives. Consequently, the site makes multiple HTTP requests to the server to render all the elements on the web page and by doing so, the page speed is slowed down as it needs to load all ads at once.
There are several advantages of using lazy load. It enables pages to load faster, reduces computer and server usage and improves viewability rate.
How to set lazy loading?
Enable your lazy load on a your domain level
- to Prebid Stack > Inventory > Domains and Edit the domain for which you want to plug on the lazy load and go to lazyload:
- Switch the toggle to
on
- Select how you want to lazy load:
- Yieldbird’s lazy load (recommended, can be enabled and disabled on ad unit level)
- Google Ad Manager’s lazy load (can be enabled only on the entire domain)
- Optionally customize your lazyload parameters You can change the advanced lazy loading settings to match the requirements for your sites:
- Auction Margin Percent The distance between the user's current viewport and the ad slot at which the Prebid auction is triggered. e.g. 100 = call Prebid auction within 1 viewport, 200, within 2 viewports etc.
- Fetch Margin Percent The distance between the user's current viewport and the ad slot at which the ad slot sends ad request to Google Ad Manager. e.g. 100 = fetch slots within 1 viewport, 200 = within 2 viewports etc.
- Render Margin Percent The distance between the user's current viewport and the ad slot at which the ad is rendered. e.g. 100 = render slots within 1 viewport, 200 = within 2 viewports etc.
- Mobile Scaling Multiplier for the three above parameters that apply to Mobile devices. e.g. 2.0 means that the three above parameters will be doubled for mobile devices (e.g. if you set render margin percent to 300, for Mobile it will be 600).
- If you use Yieldbird’s lazy load, you are able to select which ad units are to be lazy loaded - to do that:
- Go to Prebid Stack > Inventory > Ad units > select the ad unit that you want to edit > Basic settings
- Toggle on / off Yieldbird LazyLoad:
When to use lazyload?
Lazy load can be tricky. The general impact when enabling lazy load is it increases your viewability and therefore your eCPM but at the opposite, it lowers the number of ad impressions. For these reasons, lazy load can both decrease or increase your revenues and its usage can be hard and therefore monitored.
By default, you can start using lazy loading on ad-units below the fold on your domain, as you want to keep best performance for ad-units above the fold.
Also in general, you do not need to enable lazy load for all ads. For example, you might not enable lazy loading on ad slots that are close to navigation buttons, because in this case ads may not be able to load on time before the user moves to another page/screen. Also, remember that lazy load may reduce total ad requests on your ad slots depending on user behaviour. Sometimes it may not overcome revenue results that you might get from a given ad slot without lazy load, despite the fact lazy load in most cases improves your inventory quality.
After this default setting, the goal is to properly balance the usage upon ad-units and their position, best with various A/B tests. As an example, for long web pages such as media, the lazy load for footer ad-units is useful. Obviously, header ad-units shall not have lazy load. And all in between will depend on the ad-unit position, type of content (whether the user may scroll quickly or not, such as a gallery vs. a media article).