• Resolved bodabas

    (@bodabas)


    I have implemented Transitional AMP on my website and I am using the provided Astra Theme. So far it works great. The only thing that bothers me is I don’t want to use the AMP Auto Ads plug-in. There is an option from Adsense to manually place the ad code (script on header & ad code on body).

    I was able to add the Adsense AMP script on header.php of the theme and inserted the AMP ad code on the body using shortcode. The thing is, I now have two ad codes (non-amp and amp versions) on the same spot. Will this slow down my website? Technically, there are two Adsense script and two ad code on non-AMP site.

    Is there a way to manually place the AMP Adsense code on the theme without affecting the non-AMP version of the site?

    Thanks a lot.

    • This topic was modified 4 years, 2 months ago by bodabas.
    • This topic was modified 4 years, 2 months ago by bodabas.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thanks for getting in touch, great question. Inserting both variations of ad code on your site is not ideal and depending on how you setup ads there could be additional requests made.

    You could try using the Site Kit plugin if you wish to use Auto ads. This inserts the Auto ads code on your canonical (non AMP) site URLs the Auto ads for AMP code on your AMP URLs. If you wish to use Site Kit be sure to set the option to allow Site Kit to insert the snippet. (Site Kit > Settings > Connected Services > AdSense > Edit)

    If you’re looking to implement single ad units on your site you can use this resource, which has links to plugins that can ensure only the correct version of ad code exists.

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

    Thread Starter bodabas

    (@bodabas)

    Hi James,

    Sorry, I have confused you with my post. What I really meant is I don’t want to implement the Auto Ads (not the plug-in). The implementation of Auto Ads fills the webpage with up to 6 ad blocks and I am not happy with it. The max ad block I want is only 2 and there is no way to achieve this limitation on Auto Ads. I am now looking at your recommendations.

    Thank you very much for your help.

    No problem at all, happy to help. Let us know if you encounter any issues related to the AMP plugin. And we’d love to hear your plugin feedback if you have a moment free.

    Hi Bodabas,
    You can go to your Adsense account and click on ‘Ads’ > click the ‘Edit’ icon on your website > and then set ‘Ad load’ to show fewer ads. Check for the ‘Ad load’ tab on the right column.

    @souldesigns Great suggestion. While this would normally work it unfortunately doesn’t apply to AMP URLs the last time I checked. It is however a great solution for Auto ads in general, or even transitional mode.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adsense Ad Code Manual Placement’ is closed to new replies.