chore: add Whats Happening segment events analytics#29803
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. |
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 e8ff318. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag Rationale:
Performance Impact: Minimal. The Performance Test Selection: |
|




Description
Wires 5 events for Whats Happening analytics:
Card Scrolled to View, emitted via
useViewportTrackingin WhatsHappeningCardOpened — emitted in
WhatsHappeningSectionon card press and View AllViewed — emitted in
WhatsHappeningDetailViewon initial mount and on each carousel scrollInteraction — emitted in
TokenRowClosed — emitted in
WhatsHappeningDetailViewon back pressChangelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Adds new analytics instrumentation across the Whats Happening homepage section and detail flow, including new component props and scroll/visibility hooks that could subtly affect rendering or event duplication if indices/items drift.
Overview
Adds a full set of MetaMetrics Whats Happening events (new constants in
MetaMetrics.events.ts) and wires them through the homepage section and detail experience.Homepage now tracks
WHATS_HAPPENING_OPENEDwith anentry_pointfor both card taps and View more, and cards emitWHATS_HAPPENING_CARD_SCROLLED_TO_VIEWviauseViewportTracking(introducing a requiredcardIndexprop).Detail view now tracks
WHATS_HAPPENING_VIEWEDonce on initial mount and again when the carousel settles on a new index, and tracksWHATS_HAPPENING_CLOSEDon back. Token/perps CTAs and source link presses now emitWHATS_HAPPENING_INTERACTIONwith standardized properties via the new shared helpergetWhatsHappeningEventProps(plusinteraction_typeand asset/source fields).Reviewed by Cursor Bugbot for commit 9d3ed1a. Bugbot is set up for automated code reviews on this repo. Configure here.