-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/segment onboarding #67
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
…events refactor: Remove redundant onboarding events in metametrics page refactor: Use constants instead of string literals
|
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. |
| trackEvent( | ||
| { | ||
| category: MetaMetricsEventCategory.Onboarding, | ||
| event: MetaMetricsEventName.WalletSetupStarted, |
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.
this event was removed because it's used in welcome.js instead, which is consistent with mobile.
In welcome.js, WalletSetupStarted replaces OnboardingWalletCreationStarted, because both of them have the same clashing value (Wallet Setup Selected), and the key WalletSetupStarted has a consistent naming as mobile. The value of WalletSetupStarted is now changed from Wallet Setup Selected to Wallet Setup Started, which is consistent with mobile.
| NftAdded = 'NFT Added', | ||
| OnboardingWalletCreationStarted = 'Wallet Setup Selected', | ||
| OnboardingWalletImportStarted = 'Wallet Import Started', | ||
| OnboardingWalletCreationAttempted = 'Wallet Password Created', |
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.
These are unused or replaced with Wallet* events
| OnboardingWalletSecurityPhraseWrittenDown = 'SRP Backup Confirm Display', | ||
| OnboardingWalletSecurityPhraseConfirmed = 'SRP Backup Confirmed', | ||
| OnboardingWalletCreationComplete = 'Wallet Created', | ||
| OnboardingWalletCreationComplete = 'Onboarding Wallet Created', |
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.
there is already a Wallet Created value under the WalletCreated key, hence this value was renamed
| metaMetricsController.clearEventsAfterMetricsOptIn.bind( | ||
| metaMetricsController, | ||
| ), | ||
|
|
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.
we're just exposing an existing implementation. Not sure why it wasn't exposed. These methods were unused and were probably removed previously, though the implementations were kept
Description
This PR implements analytics tracking enhancements across onboarding and authentication flows by integrating a unified event buffering system and adding comprehensive wallet lifecycle tracking events.
New Analytics Events Added
The following new events were added to
shared/constants/metametrics.ts:Onboarding & Authentication:
WalletSetupStarted- When user begins wallet creation flowWalletImportStarted- When user begins wallet import flowWalletImportAttempted- When user attempts to import with SRPWalletImported- When wallet import succeedsWalletCreationAttempted- When user attempts to create new walletWalletCreated- When new wallet creation succeedsWalletSetupCompleted- When overall wallet setup completesWalletSetupFailure- When wallet setup failsWalletLoginSelected- When existing user selects social loginWalletLoginCompleted- When existing user social login succeedsWalletRehydrationAttempted- When social login user attempts to unlockWalletRehydrationCompleted- When social login unlock succeedsWalletRehydrationFailed- When social login unlock failsSRP & Security:
SrpDefinitionClicked- When user clicks "What is a Secret Recovery Phrase?"ExternalLinkClicked- Enhanced to track "Learn More" links during onboardingSettings & Password:
PasswordChanged- When user successfully changes passwordForgotPassword- When user clicks "Forgot Password"ResetWallet- When user confirms wallet resetEnhanced Event Buffering System
Modified the following components to integrate event buffering for pre-analytics-consent tracking:
Core MetaMetrics Infrastructure:
MetaMetricsProvider- Added buffering logic to store events before opt-inmetametrics.js- Added event flushing when user consents to analyticsmetamask-controller.js- Added buffering controller methodsOnboarding Components:
CreatePassword- Added wallet lifecycle tracking and learn more link analyticsImportSRP- Added SRP definition click tracking with location contextReviewRecoveryPhrase- Added SRP definition click trackingSecureYourWallet- Added SRP definition click trackingWelcome- Enhanced with social login provider tracking and account type propertiesAccountExist- Added wallet import flow tracking for social usersAccountNotFound- Added wallet setup flow tracking for social usersOnboardingMetametrics- Added event buffer flushing on opt-inAuthentication Components:
UnlockPage- Added comprehensive social login rehydration trackingChangePassword- Added password change event tracking