Search This Blog

Async Error when saving Google Adsense code in Blogger?


Async Error when saving Google Adsense code in Blogger
Async Error when pasting Google Adsense Code to Blogger:
This error is encountered when attempting to put Google Adsense Code to Blogger template.

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

Error Message Like:
"Attribute name "async" associated with an element type "script" must be followed by the ' = ' character."

Solution:

Append ="async" after async.

In the example Google Adsense Code above, the code should now look like:


<script async="async" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
 After the change, the Blogger Template should save successfully with any error.

Sponsored Links


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...