The NetMediaBlog

  • Home
    • About NetMediaBlog
    • Contributors
    • Guest Posting
    • Contact
  • Technology
    • Computers
      • Softwares
      • Downloads
      • Gaming
    • Smartphones
    • Internet
      • Tech Guide
  • Tutorials
  • Blogging Tips
    • WordPress
    • Blogger
    • SEO
  • Social Media
    • Facebook
    • Twitter
    • LinkedIn

Adding asynchronous adsense code to Blogger template without error

March 26, 2014 By Nwosu Desmond 11 Comments

The introduction of the asynchronous adsense code by Google to improve web latency and better user experience for your site visitors allowing faster page speed and general site performance may have come at a cost as many bloggers are complaining getting an error that says “Attribute name “async” associated with an element type “script” must be followed by the ‘ = ‘ character” every time they tried to add the asynchronous code to their blogger template.

In this tutorial I want to show you how you can add asynchronous adsense code to Blogger template without error. By the time you finish reading this tutorial you would’ve learnt how to add asynchronous code to HTML without getting the “Attribute name “async” associated with an element type “script” must be followed by the ‘ = ‘ character” error.

Adding asynchronous adsense code to Blogger template without error

Add asynchronous adsense code to Blogger:

First login to your Google Adsense account and generate an ad. Copy the asynchronous code. It looks like this;

<script async  src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js</span>"></script>
<!-- 336 x 280 Responsive QRS -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-731939xxxxxxxx"
 data-ad-slot="15265xxxxxx"
 data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Locate the position you want to add the adsense code to on your Blogger template.

Attribute name "async" associated with an element type "script" must be followed by the ' = ' character

You will receive a warning that “Attribute name “async” associated with an element type “script” must be followed by the ‘ = ‘ character.”

Edit the asynchronous code and add the “async” attribute to it like this;

<script async="async" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js</span>"></script>
<!-- 336 x 280 Responsive QRS -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-731939xxxxxxxx"
 data-ad-slot="15265xxxxxx"
 data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Note the =”async” attribute in line 01 in the asynchronous adsense code.

Then save your Blogger template and there won’t be any errors any more. If you find the article “Adding asynchronous adsense code to Blogger template without error” useful, leave a comment on the post.

If you have any problems or contributions please use the comment form to share with me and i will try to assist you in any way i can. Remember to subscribe to my blog.

Other Posts You May Like...

  • GoogleAdsense1Preparing for an AdSense Application
  • downloadWhen you should make your AdSense application
  • 7 Ways to Promote Your Blog7 Ways to Promote Your Blog
  • Email Marketing 101 for BloggersEmail Marketing 101 for Bloggers
  • How to improve adsense earningsHow to improve adsense earnings

Filed Under: Blogging Tips Tagged With: adsense, async, asynchronous ad code, asynchronous adsense code, Blogger, Template

Comments

  1. emmanuel says

    March 26, 2014 at 7:27 pm

    hi nwosu. thanks again for the post. i can see you’re really filling the gap of your 2014 blogging goals and missions. i’d like to ask please what the differences between the async and sync codes in google adsence dashboard?.How to Root Any Android Phones Manually Without PC.

  2. snethashree says

    March 27, 2014 at 4:33 am

    In Adsense account there having the options can choose Asynchronous code for ads, that most of them don’t know how to add it here you clearly briefed in this post to add code to website.. Thanks for sharing…

  3. Nwosu Mavtrevor says

    March 27, 2014 at 9:38 am

    Synchronous code is a type of code that will allow the complete loading of one script before the other while in asynchronous code all the scripts loads at the same time. Asynchronous codes will make your site faster and improve your user experience.

  4. Riya Khurana says

    March 27, 2014 at 6:27 pm

    i am searching for this kind of data online form past 2 days.Here i get it.While i putting adsense code to template,it gave me error.Now i found where i mistaken.
    thanks for sharing it.
    Read Also : Samsung Galaxy Note 4 Vs Galaxy Note 3 Comparison

  5. Nwosu Mavtrevor says

    March 27, 2014 at 8:34 pm

    Glad you found it informative.

  6. Vivipedia says

    March 30, 2014 at 8:16 pm

    That’s a wonderful aid to me. I have been searching for this information for quite a very long time. Thanks for this wonderful guide

  7. Manoj Jain says

    March 31, 2014 at 9:42 am

    Hi friend,
    Read your post, really that was amazing. In accordance with google, the advantage of the asynchronous rule is it’s mostly guaranteed to never get with respect to other areas of your site loading. This means that users is able to load this content of your pages, regardless of whether they’re having trouble loading this ads.
    Thanks for posting

  8. nonso says

    April 5, 2014 at 12:25 am

    Please I still have issues, the ads aren’t appearing yet, its not been so helpful

  9. Nwosu Mavtrevor says

    April 5, 2014 at 4:34 pm

    What exactly is the issue you are having?

  10. Jamie Garcia says

    October 12, 2014 at 7:46 pm

    Thank you for that information. Nwosu. Nice to get a little help.

  11. Amit says

    January 26, 2015 at 5:45 pm

    thanks a lot, i have also found a solution to this problem. you can also save it like async=”” , there’s no need to write aysnc in between quotes. One i want to clear here, i am using Chitika code not Adsense

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe To My Blog

Get the latest content first.


Recommended Articles

  • The frustrating truth about using Chromebook in Nigeria
  • How Bloggers can use IFTTT in Blog Promotion
  • Display your PC screen on TV Wirelessly with AirTame Wireless HDMI
  • DIY SEO Campaign: The Simple Way
  • Wired vs Wireless Gaming Mouse

Recommended from BroadedNet

We are upgrading BroadedNet, Blog Traffic Tool. Please keep reading www.netmediablog.com
Get Netmediablog Extension

Find Us on Facebook

Recent Comments

  • Sugar Daddy on Search Engine Optimization Tips for Images
  • Sugar Mummy on How an Active Blog Affects Your Google Rank
  • Larry Frank on 15 Highly Optimized WordPress Themes for Search Engines
  • Steven on How to transfer Contacts from Samsung Galaxy S2 to Galaxy S4
DMCA.com
  • About NetMediaBlog
  • Contributors
  • Advertise With Us
  • Contact Us
  • Guest Posting
  • Privacy Policy

Disclaimer Copyright © 2023 Netmediablog . Log in