-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: update marketing traits when tracked settings change [PR 1/2] #13254
base: main
Are you sure you want to change the base?
Conversation
update and add unit test
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Bitrise✅✅✅ Commit hash: 5843240 Note
|
Quality Gate passedIssues Measures |
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.
Left a comment
@@ -17,6 +17,8 @@ const generateUserProfileAnalyticsMetaData = (): UserProfileMetaData => { | |||
// This will return either "light" or "dark" | |||
const appThemeStyle = | |||
appTheme === 'os' ? Appearance.getColorScheme() : appTheme; | |||
const isDataCollectionForMarketingEnabled = |
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.
Is this function used in any place outside of components? If not, we should use a hook to gather redux state data instead of accessing the redux store directly.
Description
Important
This PR is the first of two.
In order to have small scope PRs and limit the amount of changes, the work is split into two PRs.
This PR mainly deals with the changes about marketing consent analytics.
It can be merged independently from 2/2.
generateUserProfileAnalyticsMetaData
user traits functionis_metrics_opted_in
from user profile traits as we don't have consistent data anyway and the fact that data is tracked means use opted in.generateUserProfileAnalyticsMetaData
functionRelated issues
Fixes part 1/2 of https://github.com/MetaMask/mobile-planning/issues/1459
Manual testing steps
Screenshots/Recordings
Before
After
Onboarding
When user check the box for collection for marketing in onboarding
Settings
When user switches ON data collection for marketing in settings
When user switches OFF data collection for marketing in settings
Marketing modal
When user touches "no thanks"
When user touches "I agree"
Pre-merge author checklist
Pre-merge reviewer checklist