feat: Integrate analytics tracking into user onboarding flow#696
Merged
RUKAYAT-CODER merged 2 commits intoJun 26, 2026
Merged
Conversation
- Added new analytics event types for onboarding lifecycle tracking: - onboarding_started: Track when user initiates onboarding - onboarding_step_completed: Track completion of each step - onboarding_completed: Track successful onboarding completion - onboarding_abandoned: Track when user leaves without completing - Integrated useAnalytics hook into OnboardingPage component - Added safe event tracking with error handling to prevent analytics failures from blocking onboarding - Added onStepChange and onStepComplete callbacks to FormWizardController - Track step details (id, index, title) and completion metadata - Added comprehensive test coverage for analytics event tracking - Verified all 7 onboarding tests pass with proper timer handling This enables analytics teams to track user onboarding funnel completion rates and identify drop-off points.
|
@dedukpe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Great job so far There’s just one blocker — the workflow is failing. Could you take a look and fix it so all checks pass? Happy to review again once that’s done. |
Contributor
Author
|
Done Ma |
Contributor
|
Thank you for contributing to the project. |
RUKAYAT-CODER
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
##Closes #381
Summary
This PR integrates comprehensive analytics tracking into the user onboarding flow to track funnel completion rates and identify user drop-off points.
Changes Made
Analytics Events
onboarding_started: Fired when user initiates the onboarding processonboarding_step_completed: Fired when user completes each steponboarding_completed: Fired when user successfully completes onboardingonboarding_abandoned: Fired when user leaves without completingComponent Updates
src/utils/analytics.tsEventNameunion typeclearAdapters()method for test purposes to reset to default console adaptersrc/app/onboarding/page.tsxuseAnalyticshook withonboardingfeature contextsafeTrack()wrapper function with error handling to prevent analytics failures from blocking onboardingonboarding_startedon component mountonboarding_step_completedwhen users advance through stepsonboarding_completedwith metadata (role, walletConnected)onboarding_abandonedwhen users navigate away (beforeunload event)src/components/forms/FormWizardController.tsxonStepCompleteoptional callback propTesting Updates
src/app/onboarding/__tests__/onboarding.test.tsxuseAnalyticshook for testingTechnical Details
Test Results
Impact
This enables analytics teams to: