Friday, September 6, 2013

Improve Your Page Loading Speed With AdSense Asynchronous Ad Code

Author: Gagan Masoun
Improve Your Page Loading Speed With AdSense Asynchronous Ad CodeAn asynchronous is a new version of Google Adsense Javascript ad code. If Adsense is running on your blog or website and wish to improve your site's page loading speed, then migrate your old AdSense ad code to the new asynchronous JavaScript tags. The main benefit of these tags, they improve web latency (waiting) and offer better users experience because they load in parallel and do not block other parts of your site page from loading.
So your blog readers will be able to load the content of your pages, even if they are having trouble loading the ads. In this short tutorial we will guide you how to implement the asynchronous ad code in Blogger blog.

Recommend For You Protect Google Adsense Account From Click Bombers

Asynchronous Code Will Look Like This:

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="zzzzzzzzzzz"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Step 1: Add the New Adsense Script

  • Go to Blogger Dashboard » Template » Edit HTML
  • Add Below Script Before </head> Tag:
<script async='async' src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Note - You only need to add this once, even if you have multiple Adsense ads.

Step 2: Replace Your Old Ad Codes With Asynchronous JavaScript

Now migrate your old AdSense ad code to the new asynchronous JavaScript ad code.
  • Search old Google ad code in your Blogger template and note its ID ("google_ad_slot").
  • Now, Go to your Adsense account » My ads tab, Get your ad unit (based on the ID) and click Get code.
  • Click the Code type drop-down menu and select "Asynchronous (BETA)".
  • Copy the new asynchronous code and paste this code into your webpage or site
  • Remove the 1st line as it is already added in Step 1.
  • Repeat steps above for each ad unit.
For any other type help please feel free to ask your questions in the comment box below. Stay Blessed and Happy Earning :)

3 comments:

  1. Good Tips dear but I have no Adsense. I hope these tips help me in future. Thanks for sharing dear.

    ReplyDelete
    Replies
    1. You can also get more Adsense tips and things before applying Adsense account.

      Delete
    2. but how dear. Please tell me how can get those tips about adsense. Please suggest me so that My account could approve.

      Delete