Google Adsense is the main and most trusted ads program in the world. It helps you easily monetize your website and blog, regardless of its size, rank or audience. It also tailor makes the ads through Google’s powerful algorithms, offering each user unique and useful products.
On the flip side, Google Adsense slows pages down. A test ran by Diana Jensen of the WPBloggingNerd showed that by adding 3 Adsense banners, page speed increased by up to 34%, the page size by 200%, and the number of requests by 400%. So in a paradoxical way, your monetization tool is also chasing your customers out of the door.
Why use lazy loading for Google Adsense
Lazy loading is a popular web-design pattern. It essentially loads an object (the ad in this case) when the user gets to it by scrolling the page. So your page will stop loading after important and above the fold elements are finished. If the user wants to navigate more, new objects will load in real-time.
By lazy loading Google Adsense, you will take some pressure of the initial loading process. making it easier for the page to load and for users to have a quick look at the site, and take actions according to what they see. Maybe they want to click on the navigation bar. Why load the footer ad for them anyway?
How can I lazy load Google Adsense on WordPress
We will offer 2 ways to lazy load Google Adsense. One is to simply use Publisher for this option and much more. The second one is to add it yourself.
The easy way: Install Publisher theme
Publisher has been the most popular WordPress theme for some years now and has unparalleled features to match its reputation. Including 58 demos and 20 premium plugins included in the package.
The most recent update of (v7.6) Publisher comes with lazy loading Google Adsense as a default. You can enable the option easily through Theme Options. To enable lazy loading for Adsense take the following steps:
- Choose Publisher from the left-hand list.
- Go to Theme Options
- Go to Advanced
- Find Lazy Loading and enable the option.
With every ad unit, comes an add code. It all includes the js code below:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Remove the code above from all ad units.
then add the code below to your site’s footer:
Tell us what you think of the new Publisher and tell us how you feel about lazy loading Adsense ads. Leave your comments below.