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)?
After you've generated the AdSense code, you need to paste it between the <head> and </head> tags of your site. We recommend you place the AdSense code on every page across your site to get the most out of AdSense.
The ad code you generate in your AdSense account is fully asynchronous. It offers improved web latency and a better user experience for your site's visitors.
After you get and copy your ad unit code, you need to paste it between the <body> and </body> tags of your page. If you paste the ad code outside the <body> tags it will prevent your ads from appearing correctly.
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>
You're writing an XHTML document (either because of the Content-Type
or an XML declaration).
Therefore, the entire document must be valid XML.
Unlike regular HTML, all XML attributes must have values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With