amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-consent: forward KV pairs from consent remote endpoint to 3p vendors

Open lannka opened this issue 8 years ago • 8 comments

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

lannka avatar Apr 27 '18 00:04 lannka

@keithwrightbos would this work?

lannka avatar Apr 27 '18 00:04 lannka

Idea would be to call this after getConsentPolicyState returns? How do you plan to pass this info for delayed fetch? window.context.consentInstanceSharedData?

keithwrightbos avatar Apr 30 '18 21:04 keithwrightbos

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

zhouyx avatar Apr 30 '18 22:04 zhouyx

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.

jasti avatar May 01 '18 02:05 jasti

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.

zhouyx avatar May 01 '18 02:05 zhouyx

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?

jasti avatar May 01 '18 02:05 jasti

Not if the publisher uses, "Supress consent" or "promptIfUnknown = false", right?

In both cases, the consent would have resolved.

zhouyx avatar May 01 '18 02:05 zhouyx

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.

jasti avatar May 01 '18 03:05 jasti