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