-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GPP/TCF cmpapi integration to respect device access in EU/CA/US #152
base: master
Are you sure you want to change the base?
Conversation
bbe7e39
to
26124b4
Compare
4ca7f91
to
d4e2bd6
Compare
d4e2bd6
to
21d66f1
Compare
lib/core/regs/consent.ts
Outdated
if (!data.gdprApplies) { | ||
return true; | ||
} | ||
return !!data.publisher.consents["1"] || !!data.publisher.legitimateInterests["1"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is incorrect, one cannot have LI on purpose 1.
You could check: ((data.purpose.consents and a vendor id you take as config) or data.publisher.consents["1"])
Going to a friendly site, https://highfivve.com/en/from-publisher-to-publisher/, and typing
__tcfapi('addEventListener', 2, function(tcData, success) { console.log('cmp responded:', tcData, success);});
your check fails bc no publisher purposes are defined and you aren't checking data.purpose at all. To check vendors, you could look at data.vendor.consents, customVendorConsents, and/or googleVendorConsents. I recommend optable register for the Google vendor list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll remove LI purpose 1 check.
As for checking vendor consent it's a good idea and I'll go ahead with checking vendor.consents
alongside purpose.consents
if a vendor ID is provided.
For customVendorConsents
and googleVendorConsents
properties I'm having trouble finding where they come from, I don't see it documented in https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#tcdata . Is it possible it's a consentmanager.net only thing? The only ref I found is https://help.consentmanager.net/books/cmp/page/changes-to-the-iab-cmp-framework-js-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is documented here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might have to parse the ac string to get the additional consented vendor list. I do suggest Optable register for this list, then you could just check for consent to yourself
dcdabbe
to
00f65f5
Compare
00f65f5
to
bcf17b3
Compare
5732ec7
to
9cd0db3
Compare
9cd0db3
to
890ebb6
Compare
5e59a4d
to
1a71560
Compare
1a71560
to
11709fc
Compare
In optable-web-sdk we currently defer the responsibility of detecting regulations and handling consent to the user which usually results in gating the load of the SDK which is not ideal.
In this PR we propose to detect regulation that should apply and integrate directly with CMP APIs (namely TCF and GPP) to gather visitor consent. Based on the detected regulation and consent, device access may be granted.
To do so, this PR introduces a new "consent" config property holding either a static consent object passed by the user, or automatically inferred:
This also updates the config object passed to instanciate the SDK to accept an optional consent retrieval configuration:
When absent, consent is granted for device access to preserve existing behavior. Eventually this may be changed to "cmpapi". Users should start passing
consent: { static: { deviceAccess: true, reg: null } }
if they want to preserve the existing behavior.Regulation Detection & device access
Regulation detection is currently implemented by looking up the timezone of the device and the languages supported.
When no regulation is detected, device access is automatically granted.
Signals passing to the DCN
Additionally to gating device access, the regulation and corresponding consent strings are passed to any DCN call as query strings as soon as they are available and set. This allows the DCN to degrade behavior based on applicable regulation, consent vs those APIs purpose