feat: Use new Segment implementation in onboarding steps (Batch 3 of 4)#7990
Merged
NicolasMassart merged 37 commits intoDec 8, 2023
Merged
Conversation
- update metrics class - extract utils - add tests - patch Segment SDK to handle proxy required content type
and updated unit tests
and fix bug and format
and add comment
…_metrics_system # Conflicts: # app/components/Nav/App/index.js
add tests add delete date getter
…5_segment_onboarding_impl
add tests add delete date getter
…5_segment_onboarding_impl # Conflicts: # app/core/Analytics/MetaMetrics.test.ts
…_metrics_system # Conflicts: # ios/Podfile.lock
and remove useless test
…5_segment_onboarding_impl
…_metrics_system # Conflicts: # ios/Podfile.lock
…5_segment_onboarding_impl
Contributor
|
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ff341f31-e3b3-4b03-9a36-845e7250c87c |
and call it from onboarding views
frankvonhoven
approved these changes
Dec 8, 2023
frankvonhoven
left a comment
Contributor
There was a problem hiding this comment.
Looks good 👍 Thanks for making that helper :)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat/batch_1129_segment #7990 +/- ##
==========================================================
Coverage ? 37.24%
==========================================================
Files ? 1142
Lines ? 29285
Branches ? 2761
==========================================================
Hits ? 10906
Misses ? 17750
Partials ? 629 ☔ View full report in Codecov by Sentry. |
|
Kudos, SonarCloud Quality Gate passed! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.








Description
What is the reason for the change?
Implement the New Segment metrics system created in PR feat: create Segment analytics implementation + use geo-localization proxy (Batch 2 of 4) #7520 in the onboarding steps.
What is the improvement/solution?
trackAfterInteractionsutility function to reduce code when tracking events.trackAfterInteractionsin all components involved in onboarding screens (seeOnboardingNavinapp/components/Nav/App/index.js)app/components/UI/OptinMetrics/index.jsRelated issues
Fixes https://github.com/MetaMask/mobile-planning/issues/1275
Manual testing steps
(1) source to look at should match the app type: dev/qa. Ask in Slack if you need access to Segment dashboards.
Screenshots/Recordings
The event tracking scope for this PR is all the screens between first start welcome screen:
and wallet screen:
From 1st start to optin. The dev logs should display the events tracked.
Notice the delay before they are sent as we have a 30s batch timer that actually sends the events in batches either every 30s or when the batch reaches 20 events.
segment_optin.mov
Then you can see the events on the Segment Dashboard. Best is to filter either by date or if you have the logs, copy the user id.
Onboarding started event:

Note
Events may not display in chronological order currently due to a behaviour on Segment server side that rewrites the timestamps. This is being worked on bit not in this PR.
Before
No visual change for users
After
No visual change for users
Pre-merge author checklist
Pre-merge reviewer checklist