• Resolved Nitin Jain

    (@glamsham)


    Hello,

    I have been getting this error ‘AMP > Custom JavaScript is not allowed’ in the google search console for my AMP pages. I am using AMPforWp and I read through their support where there is a response by them which says that AdInserter is not compatible with AMPforWP and hence the issue. Further I found a response from the author of AdInserter

    Spacetime (@spacetime)

    I’m the author of the Ad Inserter plugin – it works fine with AMP pages.

    Could I use this plugin to insert adsense in active AMP pages?

    You can configure the plugin to insert AMP ad codes on AMP pages:
    https://adinserter.pro/documentation/adsense-ads#amp

    As for me, I am using google Admanager. Can you kindly guide me how to go about correcting the issue with my AMP pages.

    OR

    Can Adinserter be used / configured with the official AMP plugin

    Thank You
    NJ

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Spacetime

    (@spacetime)

    Hello,

    Ad Inserter can work with AMP plugins – as long as it is able to detect AMP pages.
    On such pages it does not insert any Javascript code – unless it is instructed to do so.

    I checked AMP page
    https://www.glamsham.com/ott/web-review/web-series-review-jugaadistan/amp

    You are inserting this non-AMP code in the AMP header:
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9691720716894283" crossorigin="anonymous"></script>

    Thread Starter Nitin Jain

    (@glamsham)

    Hey thanks for the prompt reply. However, I am a bit confused as here it says that the code is to be placed in <head> tag.

    Kindly guide.

    Thank You

    Plugin Author Spacetime

    (@spacetime)

    Yes, for normal pages.
    But not for AMP pages.

    Thread Starter Nitin Jain

    (@glamsham)

    Oh so, then how can I have the code in the <head> tag and still prevent it from the AMP pages.

    I am using AMPforWP plugin and I have removed the said code from the Adinserter plugin header. Should I go ahead and add it in the theme header area??!!

    Kindly guide. And thank you so very much.

    Plugin Author Spacetime

    (@spacetime)

    You need to move this code above the AMP separator – for normal pages:
    https://adinserter.pro/documentation/amp-pages

    Thread Starter Nitin Jain

    (@glamsham)

    Thank You.

    Plugin Author Spacetime

    (@spacetime)

    You are welcome!

    If you like the plugin I would be grateful if you could write a short review:
    https://www.ads-software.com/support/plugin/ad-inserter/reviews/#new-post

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Admanger & Custom JavaScript is not allowed’ is closed to new replies.