ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

Issue with ad clicking behaviour: target changed from _blank to _top #40193

Open suvi-salo opened 1 week ago

suvi-salo commented 1 week ago

Hi,

We have a wide, several GAM networks affected, issue where if you click on an ad on desktop, it opens in the same window instead of a new one. On GAM, all the settings point to _blank but amp-ad-exit mjs changes it to _top. We were in touch with GAM Publisher support and they advised us to contact you here. One of the affected sites is byggebolig.no. Let me know if you need any further information from us.

erwinmombay commented 4 days ago

heya @suvi-salo . do you happen to have an example to demonstrate the behavior?

suvi-salo commented 4 days ago

@erwinmombay If you take a look at byggebolig.no and click on any ad, you'll see it opens in the same window rather than in a new tab. image image

This is what we see in amp-ad-exit-0.1.mjs file, which causes the behaviour: image

powerivq commented 2 days ago

@suvi-salo Looking at your amp-ad-exit configuration, it specified that the link is to be opened with _top (see screenshot below) , and that overrides the a tag, so everything is working as intended from AMP's perspective.

image

If you have questions about the amp-ad-exit configuration, you would need to contact GAM, as AMP only renders the creative as instructed.