Skip to content

Conversation

@rmi22186
Copy link
Member

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • If a consent string is not appended to GMP Cookie Syncs, Google will exclude these users from audiences. TCF (Transparency and Consent Framework) has specific implementation instructions that all cookie sync customers follow in order to include if someone has or has not consented
  • All Consent Management Platforms (such as OneTrust), are required to implement a function on window.__tcfapi to return TCF strings which contains what a user has/has not consented. This gets appended to the end of a cookie sync.
  • We call the API using getInAppTCData, which then returns a tcData object, and we only need the keys gdprApplies and tcString

Testing Plan

  • Was this tested locally? If not, explain why.
    Added unit tests

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@alexs-mparticle alexs-mparticle force-pushed the refactor/ts-migration-blackout-2024 branch from b28c45d to 29f34b0 Compare January 21, 2025 15:04
@rmi22186 rmi22186 force-pushed the feat/SQDSDKS-6991-cookie-sync-gdpr-2 branch from 2c977b9 to 9246789 Compare January 21, 2025 15:44
@alexs-mparticle alexs-mparticle force-pushed the refactor/ts-migration-blackout-2024 branch from 29f34b0 to 78a0cb2 Compare January 21, 2025 17:13
@rmi22186 rmi22186 force-pushed the feat/SQDSDKS-6991-cookie-sync-gdpr-2 branch from 9246789 to 85f1887 Compare January 21, 2025 21:08
import Constants from './constants';
import { MParticleWebSDK } from './sdkRuntimeModels';
import { MPID } from '@mparticle/web-sdk';
import { Logger, MPID } from '@mparticle/web-sdk';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { Logger, MPID } from '@mparticle/web-sdk';
import { MPID } from '@mparticle/web-sdk';


declare global {
interface Window {
__tcfapi: any;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we come up with a simple definition?

} as unknown) as MParticleWebSDK;

beforeEach(() => {
cookieSyncManager = new CookieSyncManager(mockMpInstance);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually being used after the last reactor we discussed?

const errorLoggerSpy = jest.fn();
const mockUrl = 'https://example.com/cookie-sync';

let cookieSyncManager: any;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this?

@sonarqubecloud
Copy link

@alexs-mparticle alexs-mparticle force-pushed the refactor/ts-migration-blackout-2024 branch from 78a0cb2 to c9a2723 Compare January 27, 2025 15:23
@rmi22186 rmi22186 changed the base branch from refactor/ts-migration-blackout-2024 to development March 14, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants