Support » Plugin: Ad Inserter - Ad Manager & AdSense Ads » Scripts for showing ads in AMP are inserted but they’re remove from source code

  • Resolved Alex

    (@alexmnrs)


    Hello!

    I’ve installed AMP for WP and inserted the required scripts in the AdInserter header section like this:

    <script data-ad-client="ca-pub-XXXXXXXXXXXXXXXX" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    
    [ADINSERTER AMP]
    <script custom-element="amp-ad" async src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
    <!-- Amp Ads -->
    <script custom-element="amp-auto-ads" async src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script>
    <!-- Auto Ads -->

    Also I have enabled the checkbox “AMP Pages” for every ad I have for the posts content in AdInserter but none of them, either normal or auto amp ads, are showing up.

    I have noticed in the source code that the script lines are automatically removed, so there are just the comment tags alone, like this:

    <!-- Amp Ads -->
    
    <!-- Auto Ads -->

    WordPress and AdInserter as well as AMP for WP are already updated to the latest versions.

    I did try disabling W3 Total Cache, Autoptimize and Async Javascript but it didn’t make any changes.

    Thanks in advance,
    Alex.

    • This topic was modified 1 year, 11 months ago by Alex. Reason: provide more details

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

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Scripts for showing ads in AMP are inserted but they’re remove from source code’ is closed to new replies.