refactor(analytics): migrate Batch 1-6: web3auth#25713
Conversation
Migrate Onboarding component to use useAnalytics hook instead of deprecated useMetrics. Both hooks provide identical API (enable(), isEnabled() methods), so all existing usage patterns remain unchanged. Part of Phase 1 analytics migration (Batch 1-6). Related: MCWP-297
|
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. |
…nd analytics mocks
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The test file changes are updating mocks to use the new Key observations:
No E2E tests are needed because:
Performance Test Selection: |
|



Description
Migrate Onboarding component to use useAnalytics hook instead of deprecated useMetrics.
Changelog
CHANGELOG entry: null
Related issues
Fixes: MCWP-297 (Batch 1-6)
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Refactor limited to analytics hook wiring and test synchronization; minimal behavioral change risk beyond potential timing/consent regressions in onboarding analytics flows.
Overview
Onboardingnow usesuseAnalyticsinstead of deprecateduseMetrics, shifting consent/enablement calls to the new analytics hook while keeping existing onboarding/OAuth tracking behavior.Tests were updated to mock
useAnalyticsand treatoptIn/optOutas async, adding aflushPromiseshelper andwaitForassertions to reduce timing-related flakiness around navigation and analytics calls.Written by Cursor Bugbot for commit fefc27e. This will update automatically on new commits. Configure here.