How To Improve The Load Time Of Adsense Advertisements

Google Adsense

This post is indirectly related to another important aspect of SEO and that is the performance of your website. Users and Google both want you to have a fast loading website to deliver the best experience possible.

However, ironically if you're using Google's advertismenet program you might find yourself suffering from slow load times due to the placement of these advertisement. So, how can you resolve this while still being Adsense compliant there is actually one method you can do.

Your typical Adsense advertising code will look something like this.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxxxxxxxx"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

It will obviously be different depending on your ID, ad size, etc however, you might be wondering what can I do to optimize this further Google already delivers async compliant versions of the tag, and thats certainly helping. If you have not swapped to this version for whatever, reason I highly recommend changing to it now but there is actually an interesting trick you might not have realized with Google advertisements.

The very first line infact, gives it away it's loading a script file that is required to load the advertisements it then uses the class, style, and ad-format to determine what type of advertisement to serve.

Therefore, if you want to reduce the load time one thing you could do is simply remove the first line of code from duplicate advertisements.

Meaning if you have three of the above codes on your website you can go ahead and remove the opening pagead2.google, code from the duplicates. But to optimize this further take that first line of code shown below.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

Then depending on your CMS simply add that code right before the closing </body> tag and now your advertisements will only have one JS file being loaded for all of them, and that code will now be loaded after the rest of the document has been rendered. This will improve your load time over traditional async tags.

That's it if you have any questions on this please feel free to ask us below and we will try our best to help you!
How To Improve The Load Time Of Adsense Advertisements How To Improve The Load Time Of Adsense Advertisements Reviewed by Unknown on 3:00 PM Rating: 5

No comments:

Powered by Blogger.