How to Lazy Load Ads

Updated on:

The concept of lazy loading ads is relatively simple. When someone first goes to your website, only the advertisements that are in the first screen view are loaded.

As soon as you start scrolling the page, the rest of the ads start to load based on an offset you define.

Let’s learn how to lazy load ads in WordPress

Why to Lazy Load ads?

With the help of Lazy loading you can improve the speed of your WordPress site and your earnings.

According to Google:

Lazy loading enables pages to load faster, reduces resource consumption and contention, and improves viewability rate by pausing the requesting and rendering of ads until they approach the user’s viewport.

Lazy loading – Google Publisher Tag

The viewability rate is the percentage of ad impressions that count as being viewed.

A viewed impression is described as being at least 50% on screen for one second

Advertisers have a strong interest in bidding more on viewable inventory because it improves their return on ad spend.

How to Lazy Load Ads

There are many ways to lazy loads but if you don’t want to spend a lot of time dealing with it, AdInserter Pro is probably your best choice.

What I like about AdInserter Pro is that you can lazy load specific ad units.

Lazy load only the ad units that you want is helpful since you don’t want to do that to units above the fold.

When you implement lazy loading this way, you can add more ad units below the fold and these won’t affect the ad viewability of your site.

That’s what Mediavine does, publishers add a bunch of ads below the fold and if you scroll down to the end, you will see them.

If a visitor didn’t feel like reading the whole article or he already found what he was looking for, the rest of ads won’t be shown.

Lazy Loading vs Delaying Script Execution

If you want to improve your site speed, you can do this by lazy loading or delaying the adsense script.

If you want to delay the adsense script, there are several plugins that can help you do that.

  • Flying Scripts is a free plugins created by WP Speed Matters that can solve your ad-related site speed issues.
  • If you care about speed, Perfmatters is your best option, you can defer, delay scripts and so much more.

Keep in mind delaying the execution of scripts is not lazy loading. Delaying the Adsense script won’t improve your viewability.

If you add 40 ad units to your website, these will start to load all at once as soon as there is user interaction and that will affect your earnings in the long run.

This Plugin doesn’t Lazy Load Ads

This is an example of a plugin called Lazy Load Adsense that only delays the Adsense Script.

Lazy Loading Adsense Plugin

The creator of the plugin know this is not lazy loading and explains what the plugin actually does:

If there is no user activity, we will delay the AdSense script for 5 seconds. If the script detects the user scrolling or any mouse activity, the script will be placed immediately.

What does the Lazy Load AdSense Plugin actually do?

The creator of the plugin knows that, now you know it too.

LazyHTML: Scripts to Lazy Load Ads

If you feel comfortable modifying and adding code to your site, you can give the Lazy HTML script a try

There is a thread in StackOverFlow and this GitHub that can help you do that if you don’t want to buy a premium plugin to lazy load ads.

I haven’t used the LazyHTML script to Lazy load ads since the script size is like 10KB.

LocalCoder also wrote about it in similar terms: How to Lazy Load Adsense Ads?

Lazy Loading Adsense Ads: Test

I think that you should lazy loads if you have many units below the fold.

I have lazy loaded ads for a long time and these are some of the numbers from 5 In-Content Units on Mobile and Desktop

UnitMobile Desktop

These are my results without lazy loading ads

UnitMobile Desktop

Lazy Loading my ad units got me a 18% more viewability on mobile and 10% more ad viewability on Desktop.

So I think lazy loading ads is something you should start doing now

What are you waiting for?

More about Speed and Monetization

The Ultimate Managed Hosting Platform

You should lazy load ads if you have several units below the fold.

These are some posts that you might be interested in

The Ultimate Managed Hosting Platform
  1. How to Increase Ad Viewability
  2. Sidebars on Tablet: Good or Bad Idea?
  3. How to Insert Ads With Blocksy Pro
  4. How to Place Ezoic Ads with Ad Inserter
  5. How to Preload Links in WordPress
  6. How to Optimize Table of Contents Plus for Speed
  7. How to Optimize GeneratePress for Core Web Vitals [100% Solved]

Sobre Jose Manuel

I am José Manuel. I am writing about things I know and things that I am learning about WordPress. I hope you find this blog useful.