How to use Lazyload Adsense?

 


The posts are updated based on the Latest Template, please follow the steps if you are using version 2.6.1

Lazyload Adsense helps speed up your site's loading time and performance. There are a few steps you need to take if you want to lazyload your AdSense scripts.


You should not use lazyload adsense, while it is under review, you must add the adsense scripts in head section at that time. It is recommended to use lazyload adsense when Adsense has approved your domain, and Ads are ready to show on your domain.

* While your site is being evaluated, follow these steps:

Identify these codes:


<!--[ Defer Adsense script use shinsenter/defer.js ]-->
<!--<script type='deferjs' src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0000000000000000' crossorigin='anonymous'/>-->

Replace the marked areas with your Publisher ID by uncommenting the codes.It will appear as:


<!--[ Defer Adsense script use shinsenter/defer.js ]-->
<script type='deferjs' src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0123456789012345' crossorigin='anonymous'/>

Using Lazyload Adsense 

* To use Lazyload Adsense, simply follow these straightforward steps: Identify these codes:


adsenseAds: {
  publisherId: caPubAdsense.replace('ca-pub-',''), /* Auto or replace with Publisher ID i.e. "000000000000", */
  antiAdBClose: "true", /* "true", if you want to add a Close Button in Anti Ad Block popup */
  ignoreMaxAge: "86400",
  loadType: "defer" /* lazy, defer, scroll */
}

If your blog is connected to Adsense, you don't have to replace the "caPubAdsense.replace('ca-pub-',''" with your Adsense Publisher ID if it isn't.For eg.supplant caPubAdsense.replace('ca-pub','') with 0123456789012345.

Set the type of script loading. For eg. lazy, defer, or scroll

Only the marked parts should be added when adding Ad Units:


Post a Comment

0 Comments

advertise
advertise
advertise
advertise