Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions app/components/Views/ChoosePassword/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,10 @@ class ChoosePassword extends PureComponent {
}

const provider = this.props.route.params?.provider;
const accountType = provider ? `metamask_${provider}` : 'metamask';

this.track(MetaMetricsEvents.WALLET_CREATION_ATTEMPTED, {
account_type: provider ? `metamask_${provider}` : 'metamask',
account_type: accountType,
});

try {
Expand All @@ -455,6 +457,18 @@ class ChoosePassword extends PureComponent {

authType.oauth2Login = this.getOauth2LoginSuccess();

const onboardingTraceCtx = this.props.route.params?.onboardingTraceCtx;
trace({
name: TraceName.OnboardingSRPAccountCreationTime,
op: TraceOperation.OnboardingUserJourney,
parentContext: onboardingTraceCtx,
tags: {
is_social_login: Boolean(provider),
account_type: accountType,
biometrics_enabled: Boolean(this.state.biometryType),
},
});

Logger.log('previous_screen', previous_screen);
if (previous_screen.toLowerCase() === ONBOARDING.toLowerCase()) {
try {
Expand Down Expand Up @@ -514,13 +528,14 @@ class ChoosePassword extends PureComponent {
}
this.track(MetaMetricsEvents.WALLET_CREATED, {
biometrics_enabled: Boolean(this.state.biometryType),
account_type: provider ? `metamask_${provider}` : 'metamask',
account_type: accountType,
});
this.track(MetaMetricsEvents.WALLET_SETUP_COMPLETED, {
wallet_setup_type: 'new',
new_wallet: true,
account_type: provider ? `metamask_${provider}` : 'metamask',
account_type: accountType,
});
endTrace({ name: TraceName.OnboardingSRPAccountCreationTime });
} catch (error) {
try {
await this.recreateVault('');
Expand Down
13 changes: 13 additions & 0 deletions app/components/Views/ImportFromSecretRecoveryPhrase/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,18 @@ const ImportFromSecretRecoveryPhrase = ({
} else {
try {
setLoading(true);
const onboardingTraceCtx = route.params?.onboardingTraceCtx;
const oauthLoginSuccess = route.params?.oauthLoginSuccess || false;
trace({
name: TraceName.OnboardingSRPAccountImportTime,
op: TraceOperation.OnboardingUserJourney,
parentContext: onboardingTraceCtx,
tags: {
is_social_login: oauthLoginSuccess,
account_type: oauthLoginSuccess ? 'social_import' : 'srp_import',
biometrics_enabled: Boolean(biometryType),
},
});
const authData = await Authentication.componentAuthenticationType(
biometryChoice,
rememberMe,
Expand Down Expand Up @@ -642,6 +654,7 @@ const ImportFromSecretRecoveryPhrase = ({
},
],
});
endTrace({ name: TraceName.OnboardingSRPAccountImportTime });
endTrace({ name: TraceName.OnboardingExistingSrpImport });
endTrace({ name: TraceName.OnboardingJourneyOverall });

Expand Down
2 changes: 2 additions & 0 deletions app/util/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export enum TraceName {
OnboardingOAuthProviderLoginError = 'Onboarding - OAuth Provider Login Error',
OnboardingOAuthBYOAServerGetAuthTokensError = 'Onboarding - OAuth BYOA Server Get Auth Tokens Error',
OnboardingOAuthSeedlessAuthenticateError = 'Onboarding - OAuth Seedless Authenticate Error',
OnboardingSRPAccountCreationTime = 'Onboarding SRP Account Creation Time',
OnboardingSRPAccountImportTime = 'Onboarding SRP Account Import Time',
SwapViewLoaded = 'Swap View Loaded',
BridgeBalancesUpdated = 'Bridge Balances Updated',
Card = 'Card',
Expand Down
Loading