How To Reduce the Load of Loading Adsense Ads

How to Reduce the Load of Adsense Ads Loading - Every code or adense ad unit script is equipped with the same adsense javascript bundle namely; <script async src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> </script>, if on a web page installed 4 ad slots will usually install 4 javascript external adsense as well.
This will certainly cause the site to load slower because the browser will render all of the external adsense javascript bundles without exception. To overcome this there are some tricks that are very effective without breaking the rules and adsense policies.

Prior to the topic of discussion and tutorial "reducing the load of loading adsense ads" I highly recommend testing the loading speed of the website with the speed analyzer tool first. and compare after applying the method of reducing the loading of adsense ads in this tutorial.

First, please install the complete auto ads unit code under the site's <head> html tag.
example:
<head>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"</script>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({
          google_ad_client: "ca-pub-420900000000002",
          enable_page_level_ads: true
     });
</script>
Then please install all other ad units without using javascript external adsense "<script async src =" https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js "> </script>", so it looks like the example below ;
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-42094xxxxxxx"
     data-ad-slot="9872xxxxx"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
After completion, please open a few pages to ensure that all advertisements are displayed (fully working). If there is an ad slot that does not appear even though it has been refreshed then move the adsense bundle in the auto ads unit code to the bottom of the site's html precisely above the cover body = </body>.

Apart from using the above method, there are still other methods to reduce the loading load of the website caused by advertisements, namely by using link loaders, the goal is to manage the adsense bundle as I have applied to this site, the following is complete;
<script type='text/javascript'>
(function() { var ad = document.createElement('script'); ad.type = 'text/javascript'; ad.async = true; ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
</script>
Instructions: Put the code above into the site html in the body area, precisely between the opening <body> tag and the closing </body> tag.

By adding the internal script above, the browser performance to load all the ad scripts is easier and very effective to reduce the burden of loading the ad so that the process of loading site pages is faster.

Actually, the two methods above are in principle the same, but based on the analysis I load the site a little faster if using the second method using a link loader compared to the first method. Thus the tutorial and explanation of how to reduce the burden of loading adsense ads and non-google ads. Hopefully this will be useful and see you later.
Tampilkan Komentar
Sembunyikan Komentar

0 Response to "How To Reduce the Load of Loading Adsense Ads"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel