feat: Telegram Login metrics#43052
Conversation
…m' into feat/seedless-onbaording-telegram
…odal and fix loader fox centering
feat(onboarding): handle outdated Telegram app with dedicated error m…
|
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. |
✨ Files requiring CODEOWNER review ✨🔐 @MetaMask/web3auth (8 files, +100 -107)
|
Builds ready [e6145ba]
⚡ Performance Benchmarks (Total: 🟢 21 pass · 🟡 4 warn · 🔴 0 fail)
Bundle size diffs
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b546901. Configure here.
Builds ready [1c6808e]
⚡ Performance Benchmarks (Total: 🟢 23 pass · 🟡 2 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| properties: { | ||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| account_type: `${MetaMetricsEventAccountType.Default}_${LOGIN_TYPE.TELEGRAM}`, | ||
| account_type: `${MetaMetricsEventAccountType.Default}_${loginType}`, |
There was a problem hiding this comment.
we can't use the accountTypeformetrics yet. Coz accountTypeformetrics selector will only return the correct value after the (seedless)onboarding state is properly updated with social login details.
At this point, we can't use that selector yet. I've added comment here (https://github.com/MetaMask/metamask-extension/pull/43052/changes#diff-4ca9b26c4727b796e59c6fb56dd5c794793bebe5174ad91445658d963e574c1fR352) for why we can't use this yet.

Description
This PR updates Onboarding metrics with the Telegram login and fixes Onboarding unlock metrics.
Changelog
CHANGELOG entry: updated onboarding metrics for Telegram Login.
CHANGELOG entry: fixed onboarding unlock metrics.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes when users leave unlock/rehydration (navigation now after metrics) and broad onboarding analytics strings; regressions could mis-route social import or skew Segment data.
Overview
This PR centralizes onboarding
account_typeanalytics via a new Redux selectorgetAccountTypeForOnboardingMetrics(moved fromseedless-onboarding/social-syncintoui/selectors/onboarding) and wires it through welcome, password creation, account status screens, completion, and unlock instead of local helpers or hardcoded values like'social'.Unlock/navigation behavior changes: successful unlock no longer navigates inside
onSubmit/tryUnlockMetamask; callers passnavigateAfterUnlockso onboarding can finish metrics/traces before redirect. Social-import rehydration completion (side panel vs default,fromredirect) runs inhandleNavigationAfterUnlockon the onboarding unlock route.Welcome/social login: early social events still build
default_<provider>/imported_<provider>inline (state not ready yet); Telegram outdated-app failures use the activeloginType. Social metrics opt-in/pna25dispatch runs after the social login handlers. Tests were updated for the deferred navigation and loading-overlay expectations.Reviewed by Cursor Bugbot for commit 1c6808e. Bugbot is set up for automated code reviews on this repo. Configure here.