ampproject / ampproject/amphtml
AMP Ads and Consent: Want NPA for Unknown and Rejected States
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello. I'm using Doubleclick for Ads and haven't been able to accomplish what seems like a straight forward scenario.
- Unknown consent: Serve NPA ads (immediately, even before the user makes an accept/reject decision)
- Accepted consent: Serve Regular Non-NPA ads
- Rejected consent: Serve NPA ads
Configuration
- `` is always set at `consentRequired: true`
- `` always includes `data-npa-on-unknown-consent="true"`
With the above configuration, Personalized Ads are always served, I'm not seeing `npa: 1` included in the ad request even if I Reject. The only time I see `npa: 1` in the ad request is if I add `data-block-on-consent` to the `` tag, however I want to avoid this because with `data-block-on-consent` if consent state is `unknown` (i.e. first time visitor), ads are not served until the person Accepts or Rejects (if they reject, then `npa: 1` is included in the Ad request). I always want Ads served **immediately** even before the person accepts or rejects. If consent state is `unknown` or `rejected` I'd like them to be NPA and only when consent state is `accepted` should personalized ads be requested.
Any suggestions or pointers are appreciated.
Contributor guide
Research direction
Begin with the and configuration described in the issue and reproduce the three consent states with DoubleClick for Ads. Verify that unknown and rejected states request NPA ads immediately, while accepted state requests personalized ads; the issue names no files or tests to guide implementation.
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
- Needs clarification
- Newbie friendliness
- 35/100