-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Description
Original discussion: #26229 (comment)
With the introduction of consent metadata, integrated ad vendors can access this information via our internal APIs.
When we originally created the metadata field, we agreed that we would not add macro support until it was requested; so we are going to move forward with that.
Proposal:
- Create and register CONSENT_METADATA macro in both amp-analytics and amp-a4a in the RTC
CONSENT_METADATA(key)=> returns the value from the corresponding key in the ConsentMetadata object. Will error if key is undefined.
amp-analytics Macro Design
- Register CONSENT_METADATA(key) macro as a part of the default macros in amp-analytics
- Use internal API to get consent metadata
- Return the associated value from the key
- Like CONSENT_STATE, return null if no consent is returned from our internal API
amp-a4a RTC Macro Design
- Expand amp-a4a to use the whole ConsentMetadata object (instead of just
gdprApplies) when we try to get the ad url - Register CONSENT_METADATA macro to be accessible to all implementations of amp-a4a
- Like CONSENT_STATE and CONSENT_STRING, return null if there is no CONSENT_METADATA object passed from our internal APIs
- If key is not defined, return a dev error that key must be defined, and then return null
/cc @zhouyx
Reactions are currently unavailable