Scripts for showing ads in AMP are inserted but they’re remove from source code
-
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.The page I need help with: [log in to see the link]
- The topic ‘Scripts for showing ads in AMP are inserted but they’re remove from source code’ is closed to new replies.