ampproject / amphtml

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

AMP ad placeholder div inside Sticky Ad container covers the ad content #15502

Closed weiwanggh closed 3 years ago

weiwanggh commented 6 years ago

Please only file bugs/feature requests for AMP here.

What's the issue?

There is a sticky ad unit at the bottom of the publisher page. It refreshes every 30 seconds. There's an amp ad placeholder div inside the publisher's sticky ad container, which should be hidden once the ad renders. But sometimes it is not hidden, which covers the ad and makes it not clickable.

How do we reproduce the issue?

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

  1. Go to the publisher page: http://www.dailymail.co.uk/news/article-5749973/amp/Inside-Harry-Meghans-lavish-evening-wedding-reception-hosted-Prince-Charles.html
  2. There is a sticky banner ad at the bottom of the page. It refreshes every 30 seconds. (If you do not see the stick banner ad at the bottom, please scroll down the page, and the ad will show up.)
  3. Switch to a different tab of the browser and come back to this tab
  4. There's an amp ad placeholder div inside the publisher's sticky ad container, which should be hidden once the ad renders. But sometimes it is not hidden, which covers the ad and makes it not clickable.

If this is a feature request you can use this section to point to a prototype/mockup that will help us understand the request.

What browsers are affected?

Reproduced on Chrome with "developer tools".

Which AMP version is affected?

I found this issue while running AMP experiments, and am not sure whether this is a new issue or existing one.

AMP version 1526498116488

zhouyx commented 6 years ago

Found the reason. Related to ad auto refreshing. Ad auto refreshing fails because it detached the iframe from the document first, and then try to release resources. where at that point ampdoc cannot be found. I'll have a fix to this bug soon.

Another thing is that I think is good to have for ad refreshing is that, maybe we should toggle on placeholder or hide the previous ad until the second ad is layout complete. Is that possible? @glevitzky WDYT?

rifqimulyawan commented 5 years ago

Sorry to ask, is there a fix to this problem, cant find the solution for my site till now

zhouyx commented 5 years ago

Hello @rifqimulyawan The issue should have been fixed by #15645. Could you explain more on why you think this is still a problem? Thank you very much.

rifqimulyawan commented 5 years ago

Hello @zhouyx, on some mobile default browser, you can see the ads still cover the ad content. This is the example url:

https://amp.kaskus.co.id/thread/5951f5f0c0d770b55a8b4569/mengenal-amp-dan-kaskus-rekanan-pertama-amp-di-indonesia-gan

This is the screenshoot, on Vivo Browsers, you can see it the ads still cover the ad content (Bottom Area of Sticky AMP)

http://prnt.sc/ostq7c

Correct me if i am wrong, i think i cant find the solution till now, on this issues, thanks for the reply by the way @zhouyx

zhouyx commented 5 years ago

Thank you @rifqimulyawan for the screenshot and the example page. To @lannka and @ampproject/wg-ads to take a look.

rifqimulyawan commented 5 years ago

Found the solution!, its on the ads setting, changed the ad size from responsive to the fixed size (320x50) solved the problem, sorry for the trouble by the way

zhouyx commented 5 years ago

Great you found the solution on your side! Thanks for letting us know.

@lannka I think it's still worth investigating. Even with the incorrect size setting, it should not lead to the behavior above. to @ampproject/ads

rifqimulyawan commented 5 years ago

I guess you are right @zhouyx, problem still occur on, especially whe text based ads,

Maybe because some mobile browser have based ad blocker extensions, such as uBlock Origin and ect., it works by preventing from third party (from cross site) requests from being made at the first place.

They explicitly and maybe they have a list of which third parties loads the ads, and then prevent the request, and that means no placeholder (the space occupied to show them on a page) for them in the rendered page output because those third party scripts were blocked from the execution.

And for on-browser that are based ad block solutions, focus on hosts that based blocking, in which a request to an ads is redirected to the localhost, which in turn does not load anything.

Since they don't prevent the third party scripts from being executed, and the scripts get to be loaded, with the placeholder the advertisement getting "reserved" in the rendered output of the sticky amp ads, but with no real ad being shown because of content request redirection, maybe. Actually my fix at changing the ads setting was not really solving the whole problem, thanks for the reply by the way, gonna looking forward for the solution from you guys who are an expert especially for this great amp project. Thanks

stale[bot] commented 3 years ago

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.