fix: add metrics opt In event cp-7.71.0#27846
Conversation
|
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27846 +/- ##
==========================================
+ Coverage 82.46% 82.51% +0.04%
==========================================
Files 4801 4804 +3
Lines 123807 123940 +133
Branches 27602 27624 +22
==========================================
+ Hits 102101 102266 +165
+ Misses 14634 14609 -25
+ Partials 7072 7065 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
All changes are purely analytics instrumentation - no UI behavior, navigation, or core wallet logic is changed. The risk is low. SmokeWalletPlatform is selected because it covers wallet lifecycle analytics tracking for new wallet creation and SRP import events - directly relevant since onboarding analytics tracking is modified. SmokeAccounts is selected because the onboarding flow (including social login path) is touched, and account creation/import flows are affected by the analytics changes. No other feature areas (confirmations, network, trade, snaps, ramps, etc.) are impacted by these purely analytics-focused changes. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk analytics-only change that adds an additional tracking call when users enable metrics (onboarding, social login, and settings). Main risk is event ordering/duplication affecting downstream dashboards rather than app behavior.
Overview
Adds a new
MetaMetricsEvents.METRICS_OPT_INevent and emits it whenever users enable metrics, including the onboarding opt-in screen (location: onboarding_metametrics), social login onboarding flow (location: onboarding_social_login), and the settings MetaMetrics toggle (location: settings/onboarding_default_settings).Updates tests to assert the new opt-in event is sent (and in settings/onboarding cases is sent before
ANALYTICS_PREFERENCE_SELECTED), including verifyingupdated_after_onboardingand optionalaccount_typeproperties.Written by Cursor Bugbot for commit 9968f73. Configure here.