Recurring AMP Page Issues

Posted in: Newspaper
Post count: 18

Hi all,

I’ve dug into these forums quite a bit and while I’ve seen other users with similar issues, I can’t find something that specifically addresses what I’m experiencing.

I have 93 pages with the error “Custom JavaScript is not allowed.” in my Google Search Console. One example of these pages is: https://rascalhoney.com/beauty/herbal-essences-naked-cleansing-conditioner/amp/.

I ran another page, http://rascalhoney.com/beauty/what-in-the-heck-is-a-nonzer/amp, through the Google AMP test tool and received the following result: The parent tag of tag ‘amp-auto-ads extension .js script’ is ‘div’, but it can only be ‘head’. Line 146:109 abs-icon”></i></div>”.

Another AMP validator returned this error: “The parent tag of tag ‘amp-auto-ads extension .js script’ is ‘div’, but it can only be ‘head’.” for the page http://rascalhoney.com/beauty/what-in-the-heck-is-a-nonzer/amp.

Perhaps these are associated with my Google AdSense code? This is a sample of the code that I have in the AMP > Ads section of the Theme Panel: “<script async custom-element=”amp-auto-ads”
src=”https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”&gt;
</script>
<amp-auto-ads type=”adsense”
data-ad-client=”ca-pub-7727580238736205″>
</amp-auto-ads>”

I’ve tried to understand the associated help articles, but they’re a bit above my skill level. Can anyone break it down for me? Many thanks in advance for your knowledge + patience.

Post count: 35449

Hi,

Yes that errors are from <amp-auto-ads> , please make sure that you make the configuration as in the amp-auto-ads documentation-> https://www.ampproject.org/docs/reference/components/amp-auto-ads

Regarding the AMP issues, seems the auto ads code has been entered in the header ad spot
http://prntscr.com/mf5orn
That would be wrong, that code can only be entered like this at the moment
https://forum.tagdiv.com/topic/info-adv-amp/
I believe an option will be added in a coming update for the AMP plugin, so that the code can be entered in the theme panel instead of the plugin files. But for the moment that is the only way.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.