Switch To Adsense Asynchronous Ad Code For Faster Page Loading
Google recently introduced an asynchronous version of their Adsense ad Javascript code. If you serve Adsense ads on your blog and wish to improve your blog loading speed, then it is a good idea to switch to the asynchronous JavaScript tags.
Asynchronous Javascripts improve web latency and offer better users experience because they load in parallel and do not block other parts of your web page from loading. This means that users will be able to load the content of your pages, even if they are having trouble loading the ads.
Here's how to implement the asynchronous ad code in Blogger:
Part 1: Add the new Adsense script
First you need to add the asynchronous script near the top of your template.
Go to Template > Edit HTML and add this script before </head>
tag:
<script async='async' src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
You only need to add this once, even if you have multiple ads.
Part 2: Replace your old ad codes
Now replace your existing individual ad codes with the their asynchronous counterparts.
- Locate your ad code in your template and note its ID. The ad ID is the number next to "google_ad_slot".
- On your Google AdSense dashboard, click "My Ads" tab to view your ads list.
- Locate the corresponding ad unit (based on the ID) and click "Get Code".
- Then click the Code type dropdown menu and select "Asynchronous (BETA)".
Your 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="yyyyyyyyyy"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
- Copy the asynchronous code and paste it over your existing ad code.
- Remove the first line as it is already added in Part 1.
- Repeat steps above for each ad unit.
Enjoy!
23 comments to "Switch To Adsense Asynchronous Ad Code For Faster Page Loading"
Wow this make our blog fast when loading adsense, thanks
@kelvin mitnick
yyyyyyyyyy is the ad ID number.
Yes this is a great feature of Google adsense. Thanks for sharing brother with us.
dear one more question
I applied for Google adsense and approve in first review. but after four day my application disapprove in 2nd review Because of does not comply with Google webmaster policy.
dear i receive 2000 visitor/ day 90 % from Google Search engine. and on friday receive 5000 – 6000 visitor. dear please help me i am so worry please check my site and suggest me so that my application could approve. thanks in advance.
I applied for adsense on 12 july. please also suggest me now when i apply for adsense?
my site: w3mix.com
Google constantly trying to improve user experiences. And this is another step of that journey. Thanks google. And thanks to writer of this post for letting us know this news.
This is a great feature added by adsense coz everyone wants their website to load faster.
thanks for this wonderful post. Every blogger wants that their website load faster
Google also now giving us 2500 rs worth adwords coupon for free to all it is a nice chance to promote our website in google .
Thanks for the notification. i am glad to know that Google introduced such great thing to load website content faster.
Great article. Now i can make my blog load faster. Thanks for the worthy post.
check out this awseom tech blog www.mytechguides.wordpress.com
I will try the tips from you on my website .. if there is trouble I will ask you. thank you for sharing knowledge
Cool Ideas to generate few more posts on my own blog.
Thanks to help me get up and write some great content.
According to google, the advantage of the asynchronous code is that it's guaranteed never to get in the way of other parts of your web page loading. This means that users will be able to load the content of your pages, even if they’re having trouble loading the ads. - See more at: http://techbloggs.blogspot.com/2013/07/AsynchronousAdSenseCode.html
Nothing's ever easy when it comes to Google Blogs!
ok, let me try it..
It's really a nice feature of Google adsense. Thanks for this tutorial about how to use. Thanks again.
Thanks for telling about this feature
great.. hope it could help us to earn more
Great Post! Thanks
it all makes sense, blogs that are already suffering from slow page load times will have a breathe of sigh now..
I dont have google adsense account yet..
how to get an adsense account?
Im dont really understand...
Will this work on a regular website as well?
@Knowledge Is Power
Yes it will work on regular website.
Post a Comment
We love to hear from you! Leave us a comment.
To ensure proper display, HTML/XML/Javascript need to be escaped first using this escape tool.