Two Ways To Fix Google Adsense "Async Error" Code In Blogger | Goodiestech Blog

20 May 2017

Two Ways To Fix Google Adsense "Async Error" Code In Blogger

Two Ways To Fix Google Adsense "Async Error" Code In Blogger Goodluck Okereke 5 of 5
Have you been getting this error  "Error Parsing XML Code Attribute name "async" associated with an element type "scr...


Have you been getting this error "Error Parsing XML Code Attribute name "async" associated with an element type "script" must be followed by the ' = ' character." when ever you try to to save your Adsense code to <head>? and you don't know what to do? Rejoice for the solution is right in your presence. Am going to show you two ways to fix it.



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 keep receiving  the same error when trying to save it.

ALSO SEE...Google Announces Changes In Adsense To Help Website Publishers

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-5780971656260898",
    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-5780971656260898",
    enable_page_level_ads: true
  });
</script>


Method 2
This method is only for those using blogger. If you fill the first method is too complex for you, then you can use this method.
1. Go to your blogger dashboard and click on Layout

2. Click on add new gadget

3.Select HTLM/Javascript

4. Paste the code in the box

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.

Is it helpful? Do you encounter any problems or issues while trying to fix Async error? Kindly ask more questions and if it works for you, kindly share your experience!


5 comments So Far...Post Yours


After dropping your comment, It will appear immediatly. Spam will be automatically deleted
Your comment(s) are appreciated. If you are finding it hard to comment, See How To Comment In Goodiestech Blog HERE

You want to get notified when i reply your comment? Kindly tick the Notify Me box.

  1. Bruh thanks bundles! Your article was super helpful. I am the guy you helped from nairaland last night

    ReplyDelete
  2. you know google said immediately after the < head > tag. does it matter if I use html/javascript added immediately on top of my post body?

    ReplyDelete
  3. If you add the code via html/javascript, google will still recognize it

    ReplyDelete
  4. Ok. Thank you. i'm still waiting for their reply tho

    ReplyDelete