ampproject / ampproject/amphtml
amp-ad: show fallback when ad blocker present
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Show fallback when ad load blocked
When a user visits a page containing amp-ad elements with an ad blocker enabled, the page should instead show the amp-ad fallback component.
## Additional context
Currently the fallback appears to only work when the ad request fails to retrieve an ad unit for some reason, for exampled no ad is available from the ad manager to fill the request. Instead, the fallback should show when the ad request itself is blocked as is the case when the user is running an ad blocker.
I found some previous work by @sebastianbenz on adblockers in https://github.com/ampproject/amphtml/issues/8311. Reading the amp-ad component documentation, it is unclear whether the current fallback is supposed to work with ad blockers already. In our testing/experience it does not.
Contributor guide
Assessment
This issue has not been assessed yet.