Latest

Monday, 15 May 2017

How To Fix Google Adsense "Async Error" Code In Blogger

Are you facing async error message issue while saving Google Adsense code? This error is so common to those using Google Adsense because when placing an Adsense code to your blog HTML, your generated Adsense code will surely give an error, if you place it raw.


In fact, all bloggers must have faced this issue but some of them think the solution is by parsing the Adsense code, NO! It can't be resolved in that way, you only have to edit or modify the Adsense generated asynchronous code otherwise, you will receive an error message saying; "Error Parsing XML Code Attribute name "async" associated with an element type "script" must be followed by the ' = ' character.". - 

Now, the solution is here to fix the async error message while integrating Adsense code in your template. You just have to modify the JavaScripts Adsense code. As shown below.

Normal Adsense code;

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-5780971656268987",
    enable_page_level_ads: true
  });
</script>

Modified Adsense code;

 <script async="async" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-5780971656268987",
    enable_page_level_ads: true
  });
</script>

This is how I modified it. Just add ="async" to the normal adsense code. Then, paste the modified Adsense code into your blogger template and Save.

No comments:

Post a Comment

Contact Us

Ads

Blog Advertising - Advertise on blogs with SponsoredReviews.com


Adbox