-
Notifications
You must be signed in to change notification settings - Fork 72
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
TCF legitimate interest fields #4037
Conversation
Passing run #4002 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
cy.window().then((win) => { | ||
win.__tcfapi("addEventListener", 2, cy.stub().as("TCFEvent")); | ||
}); |
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.
@eastandwestwind I thought this pattern worked reasonably well for testing the CMP API stuff, might be able to reuse for #3999
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.
oh awesome! I'm so glad to see this worked here, and it'll make my life so much easier 🌟
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.
Couple small things, but overall looking great @allisonking !
Closes #4036
Description Of Changes
This PR sets the legitimate interest fields we had not set before. There are legitimate interest fields for purposes and for vendors.
For purposes, we already know whether they are
Consent
orLegitimate interest
, so we can assign accordingly. We also have to make sure that we never assign to legitimate interest to purposes 1, 3, 4, 5, 6.Vendors are a little trickier. At first I had some logic to parse through the purposes attached to each vendor and set accordingly. However, the library we use appears to also do some validation here, since the GVL we pass it does list if a vendor has consent or legitimate interest purposes. For example, from the GVL:
So even if I try to set
tcModel.vendorLegitimateInterests.set(1), the library doesn't propagate it because it knows that vendor doesn't have any
legIntPurposes`!This becomes tricky with our data map as a source of truth, since somebody could feasibly set a system that disagrees with the GVL (for instance, if they set Exponential Interactive to have legitimate purposes) and then the library we use rejects it. It does seem like the GVL would be more accurate in this case, though I'm not sure about that. I did add a check to make sure we didn't set any legints that we shouldn't be
Code Changes
Steps to Confirm
For purposes
marketing.advertising.first_party.targeted
to LegIntfides-js
via the privacy center with TCF enabled environment varFor vendors
Pre-Merge Checklist
CHANGELOG.md