amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-auto-ads do not work with "Overlay formats" (anchor, side rails, vignette)

Open jeffwhelpley opened this issue 5 months ago • 6 comments

Description

I am in the process of converting some pages to AMP. The non-AMP existing version of the page that has worked for a long time correctly displays auto ads as configured through Adsense. The AMP version of the same exact page, however, doesn't work with any of the "Overlay formats" for auto ads. After a lot of testing, I do believe this is a bug within Adsense for sure and potentially within the amp-auto-ads component.

Reproduction Steps

Reproduction is pretty simple:

  1. Configure your Adsense account to use auto ads AND (importantly) click on "Overlay formats" and make sure all 3 are checked
  2. Add amp-auto-ads exactly as the documentation says
  3. Then, use the Network inspector on Chrome to look at the exact configuration that comes back from Adsense. For me in my Network inspector, the URL request looked like this:

https://pagead2.googlesyndication.com/getconfig/ama?client=ca-pub-5211547430456695&plah=gethuman.com&ama_t=amp&url=https%3A%2F%2Fgethuman.com%2Fcustomer-service%2FFedEx%2Ffaq%2FWhat-are-the-different-shipping-options-available-with-FedEx%2F4jpSN1&__amp_source_origin=https%3A%2F%2Fgethuman.com

Anyways, you will see that Adsense does correctly return placements for "In page formats" but it does not return placements for "Overlay formats". I have no idea where to file a bug with Adsense, but I strongly suspect the issue is on their side since the request to Adsense from amp-auto-ads looks right and the configuration returned DOES NOT reflect what is actually configured in the Adsense account.

If you want to see a live example compare these two pages that are exactly the same in content but one is non-AMP and the other is AMP:

Non-AMP version (auto ads working correctly) https://gethuman.com/customer-service/Verizon

AMP version (auto ads not working for Overlay formats like vignette) https://legacyweb.gethuman.com/customer-service/Verizon

Relevant Logs

Here is an example of the config I get back from Adsense for the amp-auto-ads component:

{
    "producerVersion": "20250709_104536",
    "placements": [
        {
            "anchor": {
                "selector": "DIV#lay-fl-right\u003eDIV",
                "index": 0
            },
            "pos": 1,
            "type": 1,
            "style": {
                "top_m": 10,
                "bot_m": 32
            }
        },
        {
            "anchor": {
                "selector": "DIV#lay-fl-right\u003e.min",
                "index": 0
            },
            "pos": 1,
            "type": 1,
            "style": {
                "top_m": 10,
                "bot_m": 32
            }
        },
        {
            "anchor": {
                "selector": "DIV#lay-fl-bottom",
                "index": 0
            },
            "pos": 4,
            "type": 1,
            "style": {
                "top_m": 10,
                "bot_m": 48
            }
        }
    ],
    "attributes": {
        "data-tag-origin": "ampa",
        "data-package": "8886251856"
    },
    "optInStatus": [
        2,
        1
    ],
    "adConstraints": {
        "initialMinSpacing": "600px",
        "subsequentMinSpacing": [
            {
                "adCount": 6,
                "spacing": "900px"
            }
        ],
        "maxAdCount": 8
    },
    "stickyAdAttributes": {
        "data-no-fill": "true"
    }
}

Browser(s) Affected

Chrome

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

011905222334000

jeffwhelpley avatar Jul 11 '25 11:07 jeffwhelpley