AMP error in search console

Posted in: Newsmag
Post count: 4

Hi,

Once I added my adesense code in wwww.amicoassicuratore.it, search console started to show me this AMP error:

“Il codice JavaScript non è consentito (JavaScript code is not allowed)” and when i go deeper, these are

<script async=”” src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script><!– 728×90 HP Header –><ins class=”adsbygoogle” style=”display:inline-block;width:728px;height:90px” data-ad-client=”ca-pub-6149430263152220″ data-ad-slot=”7962507897″></ins>
…………………….
<script><![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
]]></script>

<script async=”” src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script><ins class=”adsbygoogle” style=”display:block; text-align:center;” data-ad-layout=”in-article” data-ad-format=”fluid” data-ad-client=”ca-pub-6149430263152220″ data-ad-slot=”4522644690″></ins>
…………………….
<script><![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});]]></script>

And so on for all my banner

Could you please help me?
Thank you,
Co.

Post count: 23312

Hi,

I have checked your website and I saw that you have some problems with your Ads and that’s why you get these errors. Your Ads are not correctly set up and for this, you need to check the official Google AdSense documentation for that. Check here -> https://support.google.com/adsense/answer/7183212?hl=en

Thank you!

Post count: 4

My Google Search Console dashboard (AMP Section)

Error

My NewsMag Theme Panel –> AMP Settings

Setting

This is the code snippet of my Ads Unit:

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– AMP_Header-Footer –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-6149XXXXXXXXXX”
data-ad-slot=”3058XXXXXXXX”
data-ad-format=”auto”
data-full-width-responsive=”true”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Please not I didn’t add ehe snippet anywhere in the theme, i just added data-ad-client and data-ad-slot in the AMP section for header and footer

What I’m doing wrong? Please help me!!
Thank you

  • This reply was modified 7 years by PERFORLAB.
Post count: 4

Sorry, just cleaned cache and google convalidation started. It seems working.

Thank you

  • This reply was modified 7 years by PERFORLAB.
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.