Lazyloading
What is lazy loading?
Lazy loading refers to the practice of delaying the loading ads until they are actually needed. This approach helps improve website performance by reducing initial page load times and only loading ads when they are about to be viewed, enhancing user experience and potentially increasing ad viewability.
It is possible to control up to 3 parameters to customize lazy loading:
- Prebid auction
Controls when the Prebid auction will start for the lazy loaded ad unit.
- GAM Request
Controls when the ad server will be requested to select the impression to print.
- Impression rendering
Controls when the impression chosen by GAM will actually be printed.
How to implement lazy loading within Pubstack?
You can manage your lazy loading rules directly in the app: https://app.pubstack.io/adstack/lazy-loading
Pubstack provides 5 default presets to easily get you started. You cannot edit Pubstack presets.
You can also create a custom preset by clicking on “New rule”.
Pubstack recommends choosing a self-explanatory rule name, which you can edit later on if required. You can also choose to disable lazy loading on header-bidding or on GAM. You cannot disable both at the same time.
You can customize each parameter between Auction start, GAM request and Render impression (as described earlier in the documentation), according the number of viewports. A viewport is the visible area of a web page within a browser window, showing the content that is currently in view without scrolling. Setting a rule at 0 viewport means that the event will be triggered when the ad unit is in view for the user. Setting a rule at 1 viewport will trigger the event when the ad unit is at 1 viewport distance from the current user’s view.
You must respect the following rule: Auction start > GAM request > Render impression
Lazy loading rules can be applied at stack level. To do so, navigate through a stack configuration to activate lazy loading and select the rule you want to use:
You can select a different rules between Desktop and Mobile.
Editing a lazy loading rule already used in stacks will require you to synchronize them.
Technical details
Pubstack uses GAM’s lazy loading solution.