How to add Adsense lazyload script

Hello Guys and welcome to Wolv Themes Our Tutorial today is about How to add Adsense lazyload script. 

What is Adsense ?

Adsense is a product from Google Company that allow you to earn money by monetizing your website/blog content.

It's Benefits :-

  • Earn Money From Your website.
  • monetize your content.

What is AdSense LazyLoad script ?

Adsense lazyload script is a script that speeds up your Adsense ads loading speed, it will also make the ads auto.

It's Benefits :-

  1. Speed up ads loading x4 times.
  2. increase your earning revenue.
Let's Start

How to add Adsense Lazyload Script :-

Step 1 :- Go to Blogger's dashboard and click theme.
Step 2 :- Click the arrow down icon next to the 'customize' button.
Step 3 :- Click Edit Html.
Step 4 :- Copy Your adsense id it will look like this - ca-pub-xxxxxxxxxxx
Step 5 :- Remove the usual adsense script and replace it with the following code

<script type='text/javascript'>
//<![CDATA[
var lazyadsense2 = false;
window.addEventListener("scroll", function(){
if ((document.documentElement.scrollTop != 0 && lazyadsense2 === false) || (document.body.scrollTop != 0 && lazyadsense2 === false)) {
(function() { var ad = document.createElement('script'); ad.setAttribute('data-ad-client','ca-pub-xxxxxxxxxxx'); ad.async = true; ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
lazyadsense2 = true;
  }
}, true);
//]]>
</script>
Step 6 :- replace ca-pub-xxxxxxxxxxx with your Adsense id code which you copied.