• Resolved sajib116

    (@sajib116)


    Hello, I’m using AMP official plugin by and Google kits. I’m just move in AMP versions more than one week but no ads are showing on AMP version. |
    Note: I don’t placed any ad code manually, all I did is connected my site with google kit and turn on AMP from adsense …
    I need urgent help please .

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Hi @sajib116,

    Thanks for reaching out here in the support forums. So I can check the theme and plugins you have in use, and perform some checks with the Site Kit placed AdSense snippet on AMP URLs, please share your Site Health information.

    Once we have your Site Health information I can check for any possible causes for your AMP ads not working as expected, or whether the Auto ads for AMP snippet has been placed as expected on your AMP URLs.

    Thread Starter sajib116

    (@sajib116)

    Hello, thanks for reply. I have share my site information in the form.

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for sharing your Site Health info @sajib116. I’ve checked your site and I can only see the Site Kit placed snippet on your canonical (non AMP) URLs. As there seems to be something causeing the non placement or removal of your AMP snippet, please perform the below check:

    1. Navigate to “Plugins > Health Check & Troubleshooting > Troubleshoot”.
    2. From the same screen click on the “Available Plugins” tab at the top right and then click on the “Enable” option next to “Site Kit by Google”
    3. Visit any AMP URLs of your site
    4. View your sites source code (CTRL + U)
    5. Perform a search for for your AdSense publisher ID.

    While in troubleshooting mode, using the steps above, your theme will default to another WordPress theme. The above check will rule out any theme customizations or third party plugin conflicts.

    Please let me know if you are able to view your AdSense publisher ID, or any AdSense code on your AMP URLs after performing the above check. If your AdSense publisher ID doesn’t appear, place confirm your current hosting provider, and confirm that you do have Auto ads switched on at present, from your AdSense account.

    If you have any questions with the above let me know.

    Thread Starter sajib116

    (@sajib116)

    All I did all the instructions you provide and still can’t see any ads or publisher ID on sites source code.

    My current hosting provider is Namecheap and I’ve have also switched Auto ads at present on Google AdSense.
    Here is the screenshot of my Adsense account overview

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for confirming. The next check we’ll perform is to see if the snippets appear on AMP URLs when using the AMP plugin in a different mode. In order to do so, can you revisit your AMP plugin settings, and then change it to reader mode temporarily? After doing so let me know, so I can also check your reader mode AMP URLs.

    Thread Starter sajib116

    (@sajib116)

    Hello, I’ve changed it to Reade mode. And it’s marked as Not Recommended, here is the screenshot of that.
    Thank you

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for sharing. From checking your site once more while in reader mode, I can confirm also that the AdSense snippet doesn’t appear on your AMP URLs. As you’re using Site Kit to insert this snippet I’ll need to check this with the team, after discussing your case.

    In the meantime, you can revert back to transitional mode with the AMP plugin. To ensure a valid AMP snippet does appear on your AMP URLs, while I check your case with the team, you can add the below code snippet to your themes functions.php file, or preferably a child them or custom functions plugin, to ensure that any updates don’t overwrite this snippet.

    add_action('wp_body_open',function() {
    		if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
    				printf( '<amp-auto-ads  type="adsense" data-ad-client="ca-pub-8612853881892657" class="i-amphtml-layout-container" i-amphtml-layout="container"></amp-auto-ads>');
    		}
    	}
    );

    If you’re unsure of the above let me know and I’ll make this into a custom plugin, so you don’t have to insert as suggested above, you just need upload and install as a standard WordPress plugin. Let me know once you’ve done the above and I’ll check your site once. The code snippet above already references your own AdSense publisher ID and it will ensure there is a valid AdSense Auto ads snippet only on AMP URLs.

    Thread Starter sajib116

    (@sajib116)

    Hi James,

    I’ve successfully placed the above code on functions.php file, you can check it now.

    Plugin Support James Osborne

    (@jamesosborne)

    Hi @sajib116,

    Thanks for sharing. I can indeed see the code placed now. I can also see ads place on your AMP URLs, as you’ll see from this video.

    Can you browse though your site on mobile and confirm you do see ads? I’ll also report back to you here once I spoken to the team regarding Site Kit not placing AdSense code on your AMP URLs. Note that this is a separate issue to ads not appearing. Ads do seem to be appearing now, in particular on mobile.

    Thread Starter sajib116

    (@sajib116)

    Thanks @jamesosborne,

    Yes it’s working now. Thanks a lot for your help. And I need to help with a query. If I change my current theme AMP ads will stop working or it will be work..

    Plugin Support James Osborne

    (@jamesosborne)

    Great question! If you’ve added the code snippet I provided to your themes functions.php file then the ad code added from that function will not appear with your new theme. If Site Kit is not placing the ad code for you then this can result in no ads appear – as there is no ad code placed. For that reason It’s better to add the code snippet provided to a custom functions type plugin, or if you want I can create a custom plugin for you for this. Let me know if you’d like me to do so and I can send you a link shortly to this.

    Thread Starter sajib116

    (@sajib116)

    Thanks, plugin are always better option and if you can create this that will be really great. Additionally can you kindly tell me how I can track my AMP site stats properly.
    Thanks in advance.

    Plugin Support James Osborne

    (@jamesosborne)

    Not a problem, I’ve created a mini plugin for this, which you’ll find here.

    All you need to do is press the “Download Zip” button, before then uploading this zip file as a regular plugin, and then activating. You can then remove the previously added function.

    I’m happy to check your site once more after doing so. Let me know if you have any questions on this.

    Additionally can you kindly tell me how I can track my AMP site stats properly.

    For questions such as ad performance and comparing AMP vs non AMP pages the product experts over on the AdSense Help Center should be able to assist more than were can here in Site Kit support.

    I’ll also let you know when I have an update on the non placement of your AdSense snippet on AMP URLs once I have an update.

    Thread Starter sajib116

    (@sajib116)

    I’ve installed the plugin but there is a problem please see the Screenshot.

    Plugin Support James Osborne

    (@jamesosborne)

    It looks like the plugin was successfully activated. As it’s only one function I can confirm it is AMP compatible, so you can disregard that message.

    Let me know if you have any further questions on this.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘AMP ads are not placing’ is closed to new replies.