amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

AMP-AUTO-ADS not working

Open 99coder99 opened this issue 5 years ago • 2 comments

What's the issue?

AMP-AUTO-ADS not showing on AMP pages (both on mobile and desktops)

How do we reproduce the issue?

Please provide a public URL and ideally a reduced test case (e.g. on jsbin.com) that exhibits only your issue and nothing else. Provide step-by-step instructions for reproducing the issue:

  1. Visit https://fknol.com/uk/market-cap-ftse-100-index-constituents.php
  2. The page is perfect AMP page (test for AMP at https://search.google.com/test/amp),
  3. Despite using the correct adsense code in between the head tag and immediately after the body tag, it still does NOT show any ads.

Steps as above.

Also, seeing the following error/warning in Chrome Console: CustomElement] Cannot resize element and overflow is not available <amp-ad layout=​"fixed-height" height=​"0" width=​"auto" class=​"i-amphtml-layout-awaiting-size i-amphtml-element i-amphtml-layout-fixed-height i-amphtml-layout-size-defined i-amphtml-built" type=​"adsense" data-ad-client=​"ca-pub-xxxxxxx" data-tag-origin=​"ampa" data-package=​"9554703804" i-amphtml-layout=​"fixed-height" data-amp-slot-index=​"1" data-a4a-upgrade-type=​"amp-ad-network-adsense-impl" data-experiment-id=​"21068800" style=​"height:​ 0px;​">​…​​ hb @ log.js:258

I am not setting these anywhere...its all getting picked automatically. So what's the fix

What browsers are affected?

All browsers

Which AMP version is affected?

All

99coder99 avatar Dec 17 '20 12:12 99coder99

The reason the ads do nto appear is exactly what it says in the console: "Cannot resize element and overflow is not available."

The ad was crated, but it tried to resize itself, but the reflow was not avaialble.

"Reflow is not avaialble" stands for the situation when elements want to resize themselves, but that would cause visible DOM changes in the viewpoert, and that negatively affects user experience. amp auto ads prevents such situation. That means, among the rest, that you can not, for example, place an amp auto ad above the fold.

In short, this is not a bug, it's a feature.

Zer0Divis0r avatar Feb 03 '21 13:02 Zer0Divis0r

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 30 '22 18:07 stale[bot]