ampproject / ampproject/amphtml
Able to use CONSENT_STRING macro with amp-ad-custom
- 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
We use the [amp-ad-custom](https://amp.dev/documentation/components/amp-ad-custom/) tag. We would like to be able to receive consent string data when generating the ad, in particular through use of the `CONSENT_STRING` macro mentioned here:
https://github.com/ampproject/amphtml/blob/master/extensions/amp-consent/customizing-extension-behaviors-on-consent.md
## Describe alternatives you've considered
Considered using `data-block-on-consent` but this only permits simple yes/no decisions, does not allow more granular decisions as to which functionality is provided based on exact consents.
## Additional context
Will become increasingly important with more and more sites implementing consent requirements.
I'm not 100% clear if this is a bug or a feature request - I couldn't see any documentation stating that what I want to do is expected to work, therefore I considered it more of a feature request.
Contributor guide
Research direction
Start with the amp-ad-custom documentation and extensions/amp-consent/customizing-extension-behaviors-on-consent.md, focusing on how the CONSENT_STRING macro is defined and where amp-ad-custom generates ads. Trace whether the requested consent string can be exposed during ad generation; done means the feature works for amp-ad-custom while preserving granular consent information beyond data-block-on-consent.
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
- 35/100