-
-
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
chore(runway): cherry-pick fix: metrics call during onboarding #13284
chore(runway): cherry-pick fix: metrics call during onboarding #13284
Conversation
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** - refactor track trackOnboarding calls to pass an event built with MetricsEventBuilder - pass the properties with MetricsEventBuilder.addProperties ## **Related issues** Fixes MetaMask/mobile-planning#2122 ## **Manual testing steps** ```gherkin Feature: track metrics during onboarding Scenario: user creates new wallet Given a freshly installed app And user opted in for metrics When user creates a new wallet And user enters a new password Then no 'TRACK event saved {"event": undefined, "properties": {}, "type": "track"}' log is visible And the "Wallet Setup Started", "Wallet Created" and "Wallet Setup Completed" log is visible Scenario: user imports wallet Given a freshly installed app And user opted in for metrics When user imports a wallet And user enters a new password Then no 'TRACK event saved {"event": undefined, "properties": {}, "type": "track"}' log is visible And the "Wallet Import Started", "Wallet Imported" and "Wallet Setup Completed" log is visible Scenario: user manually backs the wallet up Given a freshly installed app And user opted in for metrics And user created a new wallet When user saves SRP Then no 'TRACK event saved {"event": undefined, "properties": {}, "type": "track"}' log is visible And the "Wallet Security Started", "Manual Backup Initiated", "Phrase Revealed", "Phrase Confirmed" and "Wallet Security Completed" log is visible Scenario: user skips wallet backup Given a freshly installed app And user opted in for metrics And user created a new wallet When user skips SRP backup by touching "remind me later" Then no 'TRACK event saved {"event": undefined, "properties": {}, "type": "track"}' log is visible And the "Wallet Security Skip Initiated", "Wallet Security Skip Confirmed" and "Automatic Security Checks Prompt Viewed" log is visible ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ``` INFO TRACK event saved {"event": undefined, "properties": {}, "type": "track"} ``` ### **After** examples of fixed event tracking ``` INFO TRACK event saved {"event": "Wallet Setup Started", "properties": {}, "type": "track"} INFO TRACK event saved {"event": "Wallet Created", "properties": {"biometrics_enabled": false}, "type": "track"} INFO TRACK event saved {"event": "Wallet Setup Completed", "properties": {"new_wallet": true, "wallet_setup_type": "new"}, "type": "track"} ``` ``` INFO TRACK event saved {"event": "Wallet Import Started", "properties": {}, "type": "track"} INFO TRACK event saved {"event": "Wallet Imported", "properties": {"biometrics_enabled": false}, "type": "track"} INFO TRACK event saved {"event": "Wallet Setup Completed", "properties": {"new_wallet": false, "wallet_setup_type": "import"}, "type": "track"} ``` ``` INFO TRACK event saved {"event": "Wallet Security Skip Initiated", "properties": {}, "type": "track"} INFO TRACK event saved {"event": "Wallet Security Skip Confirmed", "properties": {}, "type": "track"} INFO TRACK event saved {"event": "Automatic Security Checks Prompt Viewed", "properties": {"applicationVersion": "7.37.1", "currentBuildNumber": "1520", "deviceBrand": "Apple", "operatingSystemVersion": "18.2", "platform": "ios"}, "type": "track"} INFO TRACK event saved {"event": "Wallet Security Reminder Dismissed", "properties": {"source": "Backup Alert", "wallet_protection_required": false}, "type": "track"} ``` ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: sethkfman <[email protected]>
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. |
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
Bitrise❌❌❌ Commit hash: 88e1e94 Note
Tip
|
Quality Gate passedIssues Measures |
Description
MetricsEventBuilder
Related issues
Fixes https://github.com/MetaMask/mobile-planning/issues/2122
Manual testing steps
Screenshots/Recordings
Before
After
examples of fixed event tracking
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Co-authored-by: sethkfman [email protected] b5992b0