Skip to content

amp-consent forces iframe to load twice #36063

@janwinkler

Description

@janwinkler

Description

When amp-consent is used on a page, the content of the consent layer is displayed in an iframe. This Iframe is invisible first and then moved to a visible position in the page. Due to this move, the iframe is loaded twice and therefore cases the content of the iframe to also load twice (e.g. fireing counting pixels twice).

Reproduction Steps

Example page:
https://www.google.com/amp/s/www.ruhr24.de/nrw/nrw-corona-3g-testpflicht-disko-diskotheken-eilantrag-betreiber-ruhrgebiet-ovg-schnelltest-90979227.amp.html

Consent layer is first loaded as this:
grafik

and then immediatly moved to here:
grafik

This causes the iframe to load twice.

Same issue can be found on other pages, e.g.:

https://www.google.com/amp/s/www.sueddeutsche.de/bayern/corona-bayern-aktuell-lollitest-kita-testpflicht-1.5402821!amp (loads https://consent-cdn.sueddeutsche.de/amp/index.html multiple times)

https://www.google.com/amp/s/amp.tagesspiegel.de/politik/furcht-vor-politischem-vakuum-so-blickt-die-welt-auf-die-bundestagswahl/27608470.html (loads https://cdn.privacy-mgmt.com/wrapper/tcfv2/v1/gdpr/native-message?requestUUID=... multiple times)

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions