• Resolved arafail

    (@arafail)


    We are having a bit of an issue with the <amp-ad></amp-ad> tags on our website and we are wondering if anyone has had this issue and found a solution.

    The site we’re working on is https://www.digitalcitizen.life/

    The pages where you can see our issue are: https://www.digitalcitizen.life/8-ways-start-control-panel-windows-10/ and https://www.digitalcitizen.life/razer-viper-8khz-review/

    The issue is as follows:
    We are serving AdSense ads, via the <amp-ad></amp-ad> and on mobile devices only the served ads ignore our settings and the ads are wider than the container, like in this screenshot: https://www.screencast.com/t/XSi5x2a0p

    We have also tried using layout=”responsive” to no avail.
    Does anyone have any clue on how to solve this, and make the mobile ads respect the size we try to enforce? Thank you!

    The code is as follows:

    <div class="block--ad ad-1">
    		<amp-ad class="digcit-ad" media="(min-width: 1744px)" type="adsense" layout="fixed" width="970" height="90"  data-ad-slot="SlotIDnumber" data-ad-client="ClientNumber"></amp-ad>
    		<amp-ad class="digcit-ad" media="(min-width: 1168px) and (max-width: 1743px)" type="adsense" layout="fixed" width="728" height="90"  data-ad-slot="SlotIDnumber" data-ad-client="ca-ClientNumber"></amp-ad>
    		<amp-ad class="digcit-ad" media="(min-width: 992px) and (max-width: 1167px)" type="adsense" layout="fixed" width="580" height="400"  data-ad-slot="SlotIDnumber" data-ad-client="ClientNumber"></amp-ad>
    		<amp-ad class="digcit-ad" media="(max-width: 991.98px)" type="adsense" layout="fixed" width="300" height="250"  data-ad-slot="SlotIDnumber" data-ad-client="ClientNumber"></amp-ad>
    	</div>
    • This topic was modified 3 years, 2 months ago by arafail.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks for reaching out. From the live checks on the URLs you provided the ads are appearing sized as expected on my side, in a 300 x 250 area when using a mobile device.

    While we can only assist with AMP plugin specific queries here you may have better luck using the AdSense Help Center if you’re finding inconsistent results. If using response ads then you could also try setting a maximum percentage width on a parent div that holds the ads.

    Another option is to use a plugin such as Advanced Ads or Ad Inserter. Both are AMP compatible and have configurations that allow you to place ads based on screen sizes or devices.

    I also tried testing out your snippet using the amp-ads playground although it’s not possible to get sample ads rendered using the playgrounds test ads account.

    Sorry we can’t be of more assistance on this.

    Thread Starter arafail

    (@arafail)

    Thank you for the answer.
    We will try Ad Inserter.

    Thread Starter arafail

    (@arafail)

    Hello!
    After extensive testing, neither of the suggested plugins helped.
    We amended our code and now everything seems to be in order.
    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AMP-AD issues with Google Ads’ is closed to new replies.