Error - Asynchronous adsense code in HTML

Aws Ahmed picture Aws Ahmed · Feb 9, 2014 · Viewed 14.1k times · Source

I'm a blogger and I monetize my blog with adsense. While coding or in fact adding asynchronous code inside <head></head>tag of my blog it appears that I have to add it like this:

 <script async="async" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

instead of like this:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

Otherwise it will show me an error. Can anyone explain why? Do you know if I'm allowed to add this (according to adsense)?

Answer

Muhammad Nouman Khalid picture Muhammad Nouman Khalid · Nov 10, 2014

Use this code instead on any of them... I'm currently using this...Try it

<script async='async' src='http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>