ampproject / ampproject/amphtml
Add "_when_accepted" block-data-on-consent value for <amp-ad>
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the new feature or change to an existing feature you'd like to see
Hello everyone! As part of a complex mechanism that needs two different adNetworks to deliver an ``, I was looking for a way to:
* block networkA / allow networkB to send an ad request when the GDPR consent is negative/missing
* allow networkA / block networkB to send an ad request when the GDPR consent is positive
To do so, the native support of something like `` would be awesome.
Is it something that can be considered?
Thanks!
## Describe alternatives you've considered
So far, I tried to register the `` with some custom .js code but it is naturally blocked by AMP. So I was thinking about the native support of data-block-on-consent
## Additional context
The final setup would be
````
````
Contributor guide
Research direction
Start by tracing how handles the existing data-block-on-consent value and how consent states are represented. Check the related implementation and tests for consent blocking, then confirm that the proposed _when_accepted behavior distinguishes positive from negative or missing consent and that both ad configurations work as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100