-
-
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
feat: use Segment (batch 1) #8067
Conversation
…proxy (Batch 2 of 4) (#7520) # What is the reason for the change? - Implement a new metrics system for the Segment SDK. - Make it work alongside the old one so that we can remove the old one progressively. # What is the improvement/solution? - Create a new class to handle metrics with segment - abstract all segment SDK calls - provide our own user and anonymous Ids for improved privacy - Reuse the Mixpanel user id it available, otherwise generates a new one with the same format - patch Segment SDK to allow the privacy aware user and anonymous Ids - No event sent at all if user haven't accepted to send metrics info - Total reset of the infos in case user asks to reset (in settings) - Ability to disable all metrics - Ability to ask for deletion of all data Fixes MetaMask/mobile-planning#1222
…4) (#7990) - Initialise MetaMetrics on app start without removing Analytics yet as we still uses it outside of onboarding - create a `trackAfterInteractions` utility function to reduce code when tracking events. - Replace calls to Analytics with calls to `trackAfterInteractions` in all components involved in onboarding screens (see [`OnboardingNav`](https://github.com/MetaMask/metamask-mobile/blob/feat%2F1275_segment_onboarding_impl/app/components/Nav/App/index.js#L122-L175) in `app/components/Nav/App/index.js`) - Fix onboarding events queue usage in `app/components/UI/OptinMetrics/index.js` - Update Opt-on/Opt-out in onboarding - Extract Analytics User profil properties in UserProfileMetaData util and inject it in MetaMetrics identify request alongside device metadata Fixes MetaMask/mobile-planning#1275
- rename Segment env vars: - `SEGMENT_WRITE_KEY` - `SEGMENT_PROXY_URL` - add env var placeholders in example file Fixes missing variables naming change in MetaMask/mobile-planning#1222
…k-mobile into feat/batch_1129_segment
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. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@segment/analytics-react-native@2.13.0, npm/@segment/sovran-react-native@0.4.5 |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again. Next stepsWhat is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. What is a deprecated package?The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed. Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
# Conflicts: # app/components/Views/AccountBackupStep1/index.js # app/components/Views/AccountBackupStep1B/index.js # app/components/Views/ChoosePassword/index.js # app/components/Views/ManualBackupStep1/index.js # app/components/Views/ManualBackupStep2/index.js # app/components/Views/ManualBackupStep3/index.js
# Conflicts: # app/components/Views/Settings/SecuritySettings/SecuritySettings.tsx
# Conflicts: # yarn.lock
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/88255595-f8ea-4a47-ba22-73df25fca7b2 |
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.
AMAZING WORK! LGTM! Just left a nit pick that i've found but it's okay to merge it without it!
app/components/Views/Settings/SecuritySettings/Sections/DeleteMetaMetricsData.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Settings/SecuritySettings/Sections/DeleteMetaMetricsData.tsx
Outdated
Show resolved
Hide resolved
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.
Actually it seems that the unit tests are failing! We will need to address that
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.
LGTM!
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.
LGTM!
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0e74e625-dee6-4c29-b021-2756941883f2 |
Description
Batch PR to group changes from:
Related issues
Fixes https://github.com/MetaMask/mobile-planning/issues/1129
Manual testing steps
See each PR for details
Screenshots/Recordings
See each PR for details
Before
See each PR for details
After
See each PR for details
Pre-merge author checklist
Pre-merge reviewer checklist