chore: add scroll event to Market Insights card#27872
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.
| .addProperties({ | ||
| caip19: caip19Id, | ||
| digest_id: caip19Id, | ||
| asset_name: report.asset, |
There was a problem hiding this comment.
Inconsistent analytics property name asset_name vs asset_symbol
Medium Severity
The scroll-into-view event in MarketInsightsEntryCard.tsx sends the asset as asset_name, but every other analytics event in this PR uses asset_symbol (in MarketInsightsView.tsx, AssetOverviewContent.tsx, and PerpsMarketDetailsView.tsx). This inconsistency means the new scroll event will track the asset under a different property name than the rest of the Market Insights funnel, making it difficult to correlate CTR data — which is the stated goal of this PR. The test also asserts asset_name, so both need updating.
Additional Locations (1)
|
✅ E2E Fixture Validation — Schema is up to date |
|
c12eddb
into
TSA-299-track-ai-asset-symbol





Description
This PR adds a segment event to track when the Market Insights card comes into view. This is necessary because at the moment it always renders below the fold, making it arduous to get good CTR data for the Market Insights feature. This adds a useful, intermediate step in the funnel.
scroll.mp4
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new visibility-detection hook that uses a 250ms polling interval until the card is visible, which could impact performance or battery if misapplied. Other changes are additive analytics property updates with low functional risk.
Overview
Adds a new
MARKET_INSIGHTS_CARD_SCROLLED_TO_VIEWanalytics event that fires once when the Market Insights entry card becomes at least 50% visible, using a newuseViewportTrackinghook (layout + short polling) and wiring it intoMarketInsightsEntryCard.Extends Market Insights telemetry to include
asset_symbolonMARKET_INSIGHTS_OPENED,MARKET_INSIGHTS_VIEWED, andMARKET_INSIGHTS_INTERACTIONevents (token + perps contexts), with updated unit tests to assert the new properties and event emission.Written by Cursor Bugbot for commit 4407c73. This will update automatically on new commits. Configure here.