-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/segment onboarding #60
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
base: chore/sentry-onboarding
Are you sure you want to change the base?
Conversation
refactor: Use consent-aware tracking in login page
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. |
@@ -112,7 +113,7 @@ const AccountBackupStep1 = (props) => { | |||
const track = (event, properties) => { | |||
const eventBuilder = MetricsEventBuilder.createEventBuilder(event); | |||
eventBuilder.addProperties(properties); | |||
trackOnboarding(eventBuilder.build()); | |||
trackOnboarding(eventBuilder.build(), props.saveOnboardingEvent); |
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.
most trackEvent
calls have been replaced with the trackOnboarding
call wrapped under the function track
, because we want to buffer events. trackOnboarding
is often call with saveOnboardingEvent
as the second param in order to buffer events to the redux store. I have updated most if not all trackOnboarding
calls to include saveOnboardingEvent
as the second param for consistency. Not sure why they were not included in the first place.
note that in some pages we are still using trackEvent
because there is no need to buffer events anymore as the pages will only appear during post-onboarding, e.g. ResetPassword, ProtectYourWallet, SRPListItem, etc
WALLET_REHYDRATION_FAILED = 'Wallet Rehydration Failed', | ||
PASSWORD_CHANGED = 'Password Changed', | ||
// TODO: Add this event once we have a forgot password flow | ||
// FORGOT_PASSWORD_CLICKED = 'Forgot Password Clicked', |
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.
the forgot password flow is currently unavailable as mentioned by @ieow
it will / might be restored later on
…d flow is implemented
Description
This PR implements analytics tracking enhancements across onboarding and authentication flows by integrating a unified event dispatching system and adding new tracking events.
New Analytics Events Added
The following new events were added to
MetaMetrics.events.ts
:Onboarding & Authentication:
WALLET_LOGIN_SELECTED
- When user selects login methodWALLET_LOGIN_COMPLETED
- When existing user login succeedsWALLET_REHYDRATION_ATTEMPTED
- When social login user attempts to unlock walletWALLET_REHYDRATION_COMPLETED
- When social login wallet unlock succeedsWALLET_REHYDRATION_FAILED
- When social login wallet unlock failsRESET_WALLET_CLICKED
- When user clicks reset wallet optionSRP & Security:
SRP_DEFINITION_CLICKED
- When user clicks "What is a Secret Recovery Phrase?"SECRET_RECOVERY_PHRASE_PICKER_CLICKED
- When user opens SRP selector in multi-SRP scenariosSRP_SCREENSHOT_ATTEMPTED
- When user attempts to screenshot SRP screensSettings & Password:
PASSWORD_CHANGED
- When user successfully changes password (includes biometric properties)Enhanced Event Dispatching System
Modified the following components to integrate
saveOnboardingEvent
Redux action for consistent event collection:Onboarding Components:
AccountBackupStep1
- Added SRP definition click trackingAccountBackupStep1B
- Added SRP definition click and manual backup initiation trackingManualBackupStep1
- Added SRP definition click and phrase reveal trackingManualBackupStep2
- Added phrase confirmation trackingManualBackupStep3
- Added backup completion and hint saving trackingOnboarding
- Enhanced with account type properties for all flowsChoosePassword
- Added external link click trackingAuthentication Components:
Login
- Added comprehensive OAuth flow tracking (rehydration attempts/completion/failure)AccountStatus
- Connected to event dispatching systemImportFromSecretRecoveryPhrase
- Added SRP definition click trackingSettings & Security:
ResetPassword
- Added password change event with biometric propertiesAddNewAccount
- Added SRP picker click trackingProtectYourWallet
- Added SRP picker click trackingScreenshotDeterrent
- Added SRP-specific screenshot attempt tracking