amp-consent: forward KV pairs from consent remote endpoint to 3p vendors
There are use cases where the remote endpoint want to share more information in addition to the consent state to 3p vendors, such as if the current user is under certain of age or so.
We propose a generic data object named sharedData in the checkConsentHRref response, which will be passed along with consent state to any 3p vendors that are interested in consent state.
{
promptIfUnknown: {boolean}
sharedData: {Object}
}
For privacy reason, this sharedData is not persisted in client side storage. It will be fetched and forwarded on page view basis.
To get this data, 3p vendor extensions can call
getConsentPolicySharedData(policyId)
Master issue: #13716
@keithwrightbos would this work?
Idea would be to call this after getConsentPolicyState returns? How do you plan to pass this info for delayed fetch? window.context.consentInstanceSharedData?
It doesn't make much sense to me having<amp-consent> pass a not used data to other extensions. Especially if we are going to support multiple consent, how would we merge multiple sharedData?
Would it be better for the ad to directly fetch the data? (in rtc?)
cc @keithwrightbos @jasti
As discussed, I think not having it passed via checkConsentHref would mean that the publisher would need to host 2 end points. The other issue is that RTC can't be triggered without user consent which is a catch 22.
The other issue is that RTC can't be triggered without user consent which is a catch 22.
In any case, the sharedData should only be accessible after consent has resolved. I wouldn't concern too much about fetching the data after user consent.
In any case, the sharedData should only be accessible after consent has resolved. I wouldn't concern too much about fetching the data after user consent.
Not if the publisher uses, "Supress consent" or "promptIfUnknown = false", right?
Not if the publisher uses, "Supress consent" or "promptIfUnknown = false", right?
In both cases, the consent would have resolved.
I think I'm missing something. It's not about the consent "resolving". The problem is the case when the publisher can't show a consent to some users (user under age 16) and therefore can't invoke RTC. Lets chat in person tomorrow if this is not clear.