ampproject / amphtml

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

Add "_when_accepted" block-data-on-consent value for <amp-ad> #32324

Open mlapeyre3 opened 3 years ago

mlapeyre3 commented 3 years ago

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 <amp-ad>, I was looking for a way to:

Is it something that can be considered? Thanks!

Describe alternatives you've considered

So far, I tried to register the <amp-ad> 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

<amp-ad
    data-block-on-consent="_til_accepted"
    width="320"
    height="50"
    ...>
</amp-ad>

<amp-ad
    data-block-on-consent="_when_accepted"
    width="320"
    height="50"
    ...>
</amp-ad>
stale[bot] commented 2 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.