Skip to content
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

feat: Implement Google EU Consent #51

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

rmi22186
Copy link
Collaborator

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

Implement Braze's EU consent for Google.

The kit should set consent on a Braze user as a custom attribute:

  • During kit initialization when a user has set consent previously, and consent mapping is configured in the UI
  • When an event is logged, the kit will compare the event's consent state to the most recent user consent state. If it has changed, set the new Braze consent state then send the event. If not, then do not set consent and log the event.

When consent mapping is not configured in the UI, OR a customer does not have consent on it, do not attempt to set consent on the Braze user.

Testing Plan

  • Was this tested locally? If not, explain why. - Added unit tests for all the conditions above, and manually tested this in a local app.

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

test/tests.js Outdated Show resolved Hide resolved
test/tests.js Outdated Show resolved Hide resolved
@rmi22186 rmi22186 requested a review from mmustafa-tse October 22, 2024 19:15
@@ -12,7 +12,9 @@
"scripts": {
"build": "rollup --config rollup.config.js",
"watch": "rollup --config rollup.config.js -w",
"test": "node test/boilerplate/test-karma.js"
"test": "node test/boilerplate/test-karma.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this is out of scope, but we should add a follow up item to remove the boilerplate tests in favor of the most recent test framework. The boilerplate framework is known to fail silently at times and I would rather we brought Braze in line with the rest of the kits.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll add this work item to the rollup.test.config.js since I can't add comments to a json file.

https://go.mparticle.com/work/SQDSDKS-6875

src/BrazeKit-dev.js Outdated Show resolved Hide resolved
src/BrazeKit-dev.js Outdated Show resolved Hide resolved
test/tests.js Outdated Show resolved Hide resolved
test/tests.js Outdated Show resolved Hide resolved
@mmustafa-tse
Copy link

lgtm overall, just added a couple of suggestions, please ignore if I'm wrong

test/tests.js Outdated Show resolved Hide resolved
@rmi22186 rmi22186 merged commit af1aa32 into master-v4 Oct 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants