Skip to content

feat(analytics): onboarding checklist Segment events (TMCU-680)#29824

Merged
PatrykLucka merged 32 commits into
mainfrom
feat/TMCU-680-onboarding-checklist-segment-events
May 14, 2026
Merged

feat(analytics): onboarding checklist Segment events (TMCU-680)#29824
PatrykLucka merged 32 commits into
mainfrom
feat/TMCU-680-onboarding-checklist-segment-events

Conversation

@wachunei
Copy link
Copy Markdown
Member

@wachunei wachunei commented May 6, 2026

Description

Stacked on TMCU-610-shadowbox-checklist-logic (parent PR #28851).

Reason: TMCU-680 requires Segment-oriented tracking for the new wallet home post-onboarding checklist so product can measure funnel performance.

Solution:

  • Home Viewed — Fires when the user views each checklist step, with interaction_type: onboarding_checklist, section_name per step (on_ramp, first_trade, notifications), and the same contextual fields as other home impressions (entry_point, visit_number, app_session_id, etc.) via useWalletHomeOnboardingChecklistHomeViewed.
  • Ramps Button Clicked — On fund-step primary, location: onboarding_checklist plus standard ramp props (ramp_type, region, ramp_routing, is_authenticated, preferred_provider, order_count) via useWalletHomeOnboardingChecklistFundPress wired from AccountGroupBalance.
  • Unified SwapBridge Button Clicked — Checklist trade primary passes a per-call swapButtonClickLocationOverride so location is onboarding_checklist without changing bridge session attribution (useSwapBridgeNavigation + goToSwapsFromOnboardingChecklist in Wallet).
  • ActionLocation.ONBOARDING_CHECKLIST — Shared enum value for the onboarding_checklist location string.

Changelog

CHANGELOG entry: Recorded analytics events for the wallet home post-onboarding checklist (Home Viewed per step, Ramps Button Clicked, Unified SwapBridge Button Clicked with onboarding checklist location).

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-680

Refs: #28851

Manual testing steps

Feature: Wallet home post-onboarding checklist analytics (TMCU-680)

  Scenario: Home Viewed fires per checklist step
    Given homepage sections v1 and the post-onboarding checklist AB treatment are enabled
    And the user is eligible and sees the checklist on wallet home
    When they land on the fund step, then advance to trade, then notifications
    Then Home Viewed fires with interaction_type onboarding_checklist and section_name on_ramp, first_trade, and notifications respectively (verify in analytics debugger or logs if available)

  Scenario: Add funds sends Ramps Button Clicked with checklist location
    Given the checklist fund step is visible
    When the user taps the fund primary (Add funds)
    Then Ramps Button Clicked includes location onboarding_checklist and standard ramp properties

  Scenario: Trade sends Unified SwapBridge Button Clicked with checklist location
    Given the checklist trade step is visible
    When the user taps the trade primary
    Then Unified SwapBridge Button Clicked includes location onboarding_checklist

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Adds new analytics events and changes swap/on-ramp click attribution paths; risk is mainly incorrect event properties or over/under-firing rather than user-facing breakage.

Overview
Adds Segment-style analytics for the wallet home post-onboarding checklist: fires HOME_VIEWED when each checklist step is shown (with interaction_type: onboarding_checklist and step-specific section_name).

Wraps the checklist fund primary action to emit RAMPS_BUTTON_CLICKED with location: onboarding_checklist before navigating to buy, and updates swaps navigation to accept a per-call location override so checklist trade clicks report onboarding_checklist without altering bridge session attribution. Also introduces ActionLocation.ONBOARDING_CHECKLIST and wires the new callbacks through AccountGroupBalance/Wallet, with new/updated unit tests for these tracking behaviors.

Reviewed by Cursor Bugbot for commit 5ab8549. Bugbot is set up for automated code reviews on this repo. Configure here.

PatrykLucka and others added 17 commits May 6, 2026 16:38
…o use popularNetworks from useNetworkEnablement
…ance, streamline WalletHomeOnboardingSteps logic
…s to onboarding steps and AccountGroupBalance component
…teps to handle transition states more effectively
…ling and Rive state management for smoother transitions
…ing animation and interaction mocks with requestAnimationFrame handling
…e onboarding steps with security data handling in TokenListItem
…HomeOnboardingSteps for improved fund step handling and navigation flow
…resolve conflicts

Co-authored-by: wachunei <1024246+wachunei@users.noreply.github.com>
- HOME_VIEWED with interaction_type onboarding_checklist and section_name per step
- RAMPS_BUTTON_CLICKED with location onboarding_checklist on fund primary
- SWAP_BUTTON_CLICKED location override for checklist trade primary
- ActionLocation.ONBOARDING_CHECKLIST; tests
@wachunei wachunei requested review from a team as code owners May 6, 2026 20:47
@metamaskbotv2 metamaskbotv2 Bot added the team-money-movement issues related to Money Movement features label May 6, 2026
@github-actions github-actions Bot added the size-L label May 6, 2026
@wachunei
Copy link
Copy Markdown
Member Author

wachunei commented May 6, 2026

bugbot run

Portfolio header paths used bare AccountGroupBalance and always-mounted
AssetDetailsActions; align with legacy content cluster so main actions hide
during the checklist and coordinated exit callbacks reach AccountGroupBalance.
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 d64c94f. Configure here.

Comment thread app/components/Views/Wallet/index.tsx Outdated
@wachunei
Copy link
Copy Markdown
Member Author

wachunei commented May 7, 2026

@copilot resolve the merge conflicts in this pull request

@wachunei wachunei requested review from a team as code owners May 8, 2026 14:03
@wachunei wachunei changed the base branch from main to TMCU-610-shadowbox-checklist-logic May 8, 2026 14:03
Base automatically changed from TMCU-610-shadowbox-checklist-logic to main May 8, 2026 14:05
@wachunei
Copy link
Copy Markdown
Member Author

wachunei commented May 8, 2026

@copilot resolve the merge conflicts in this pull request

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

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.

Co-authored-by: wachunei <1024246+wachunei@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in 0fd1a8f. I merged latest main, fixed all conflict markers, and this PR is mergeable again. No UI changes were introduced in this conflict-resolution merge (screenshot: N/A).

@wachunei wachunei removed request for a team May 12, 2026 13:31
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokeMoney, SmokeSwap, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR introduces analytics instrumentation for the wallet home onboarding checklist (TMCU-680). Key changes:

  1. Wallet/index.tsx (core wallet home screen): Refactored to use shared props objects for AccountGroupBalance and AssetDetailsActions, and added goToSwapsFromOnboardingChecklist with ActionLocation.ONBOARDING_CHECKLIST override. This is the main wallet home screen and any regression here would be critical.

  2. AccountGroupBalance.tsx: The onFundPrimaryPress prop now uses useWalletHomeOnboardingChecklistFundPress(goToBuy) instead of goToBuy directly. While functionally equivalent (the hook calls goToBuy() after tracking), this wrapping could introduce issues if the hook has bugs.

  3. useSwapBridgeNavigation/index.ts: Added optional swapButtonClickLocationOverride parameter to goToNativeBridge and goToSwaps. Backward compatible but touches the swap navigation flow.

  4. WalletHomeOnboardingSteps.tsx: Added useWalletHomeOnboardingChecklistHomeViewed hook integration for analytics.

  5. New analytics hooks and constants - primarily analytics, low functional risk.

Tag selection rationale:

  • SmokeWalletPlatform: Wallet home screen (Wallet/index.tsx) is directly modified with refactoring and new callbacks. The onboarding checklist steps are part of this area.
  • SmokeMoney: The fund/buy flow (goToBuy via ramp navigation) is wrapped with new analytics in useWalletHomeOnboardingChecklistFundPress. Ramps/buy flows need validation.
  • SmokeSwap: The goToSwaps function has a new optional parameter and goToSwapsFromOnboardingChecklist is wired in the wallet home. Swap navigation needs validation.
  • SmokeConfirmations: Required per tag descriptions when selecting SmokeSwap and SmokeMoney, as confirmations are part of those flows.

Performance Test Selection:
The changes are primarily analytics instrumentation (adding tracking events to existing flows) and a DRY refactor of the wallet home screen props. No new UI components are added, no list rendering changes, no state management changes that would affect performance. The new hooks are lightweight (useEffect + trackEvent calls). No performance impact is expected.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@PatrykLucka PatrykLucka added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit c946077 May 14, 2026
278 of 304 checks passed
@PatrykLucka PatrykLucka deleted the feat/TMCU-680-onboarding-checklist-segment-events branch May 14, 2026 10:39
@github-actions github-actions Bot locked and limited conversation to collaborators May 14, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-L team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants