Support » Plugin: AMP » Ads not showing

  • Resolved satheeshrajv



    In my amp page ads are not showing. I’m using paired mode.

    Note: The AMP page will load properly only in mobile not in desktop. So please check it in mobile version.

    Satheeshraj V

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pascal Birchler


    Hi @satheeshrajv

    Does your theme have some kind of separate mobile version then? Because that totally can mess with AMP validation, which might also be a problem causing the main issues you are having in

    First of all, page-level ads (enable_page_level_ads) are deprecated in AdSense. You should use AdSense Auto Ads instead. You can use this plugin to use Auto Ads with AMP:

    Besides that, regular AdSense ads need to be declared a bit differently for AMP as well.

    Let’s take this example ad as it exists on your site multiple times:

    <script async src="//"></script>
    <ins class="adsbygoogle"
    (adsbygoogle = window.adsbygoogle || []).push({});

    For AMP, this will need to be replaced by this:

    <amp-ad width="100vw" height=320
        <div overflow></div>

    In your theme, you can do something like this to use both versions, depending on whether you are looking at the AMP version or not:

    <?php if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) : ?>AMP ADSENSE CODE<?php else : ?>REGULAR ADSENSE CODE<?php endif; ?>

    For more information, please check out the AdSense documentation:

    PS. Please note that on your regular non-AMP website you seem to be using AdSense incorrectly by loading adsbygoogle.js multiple times instead of just once.

    Hi Pascal,

    I tried to implement most of your suggestion and now ads are displaying properly. One thing that I need a clarification is about “enable_page_level_ads”. You have mentioned that it is deprecated but I’m able to see that in my adsense account.Is it really deprecated or we can use it.

    Satheeshraj V

    Plugin Author Pascal Birchler


    @satheeshrajv Good question! Deprecated means you can continue using them for the time being, but there won’t be any further enhancements to the feature. Your existing settings should have already been migrated over to Auto ads.

    Auto Ads offer some new opportunities like new ad formats and advanced URL settings. You can learn more about it here:

    dhaval d


    Hi Pascal,

    I have added google ads in my website but when i open my blog with amp the ads are not showing. When i have check in google amp the error seems to be caused by a script for adsense . I am not very familiar with this issue so please let me know proper solution for this.

    • This reply was modified 5 months ago by dhaval d.
    Plugin Author albertomedina


    @classicus Please open a separate topic in the forum to address your issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.