feat: Include consent query parameters for cookie sync#966
Open
rmi22186 wants to merge 12 commits intodevelopmentfrom
Open
feat: Include consent query parameters for cookie sync#966rmi22186 wants to merge 12 commits intodevelopmentfrom
rmi22186 wants to merge 12 commits intodevelopmentfrom
Conversation
b28c45d to
29f34b0
Compare
2c977b9 to
9246789
Compare
29f34b0 to
78a0cb2
Compare
9246789 to
85f1887
Compare
alexs-mparticle
requested changes
Jan 22, 2025
rmi22186
commented
Jan 23, 2025
rmi22186
commented
Jan 23, 2025
alexs-mparticle
requested changes
Jan 24, 2025
alexs-mparticle
requested changes
Jan 27, 2025
src/cookieSyncManager.ts
Outdated
| import Constants from './constants'; | ||
| import { MParticleWebSDK } from './sdkRuntimeModels'; | ||
| import { MPID } from '@mparticle/web-sdk'; | ||
| import { Logger, MPID } from '@mparticle/web-sdk'; |
Collaborator
There was a problem hiding this comment.
Suggested change
| import { Logger, MPID } from '@mparticle/web-sdk'; | |
| import { MPID } from '@mparticle/web-sdk'; |
src/cookieSyncManager.ts
Outdated
|
|
||
| declare global { | ||
| interface Window { | ||
| __tcfapi: any; |
Collaborator
There was a problem hiding this comment.
Can we come up with a simple definition?
test/jest/cookieSyncManager.spec.ts
Outdated
| } as unknown) as MParticleWebSDK; | ||
|
|
||
| beforeEach(() => { | ||
| cookieSyncManager = new CookieSyncManager(mockMpInstance); |
Collaborator
There was a problem hiding this comment.
Is this actually being used after the last reactor we discussed?
test/jest/cookieSyncManager.spec.ts
Outdated
| const errorLoggerSpy = jest.fn(); | ||
| const mockUrl = 'https://example.com/cookie-sync'; | ||
|
|
||
| let cookieSyncManager: any; |
Collaborator
There was a problem hiding this comment.
Do we still need this?
|
78a0cb2 to
c9a2723
Compare
0ba2d13 to
905641c
Compare
905641c to
b16bdd2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Instructions
developmentSummary
window.__tcfapito return TCF strings which contains what a user has/has not consented. This gets appended to the end of a cookie sync.tcDataobject, and we only need the keysgdprAppliesandtcStringTesting Plan
Added unit tests
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)