chore: adds market insights metric to Perps view entry point cp-7.71.0#27814
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These are analytics/tracking improvements with no UI changes. The component is only imported by the Perps routes (index.ts and routes/index.tsx), so impact is contained. SmokePerps is selected as the primary tag since this is a Perps screen. SmokeWalletPlatform is required per tag description (Perps is a section inside Trending tab). SmokeConfirmations is required per SmokePerps tag description (Add Funds deposits are on-chain transactions). Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Adds two missing metric events to the Perps Market Details view to bring it to parity with the token details flow.
MARKET_INSIGHTS_OPENEDnow fires whenever a user taps the Market Insights entry card, andPERPS_SCREEN_VIEWEDnow includes amarket_insights_displayedboolean property that reflects whether a report was actually shown, with the event held until the insights fetch resolves so the value is fully accurate.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: changes are limited to analytics instrumentation and event timing gated on Market Insights loading, with added unit tests to validate tracking and navigation behavior.
Overview
Adds missing Market Insights instrumentation to the Perps market details screen.
PerpsMarketDetailsViewnow firesMetaMetricsEvents.MARKET_INSIGHTS_OPENED(withperps_market) when the Market Insights entry card is tapped, and delaysMetaMetricsEvents.PERPS_SCREEN_VIEWEDuntil insights loading completes so it can include an accuratemarket_insights_displayedboolean.Updates/extends
PerpsMarketDetailsView.test.tsxwith mocks foruseMarketInsights/feature flags and new tests covering the new tracking payloads and navigation toRoutes.MARKET_INSIGHTS.VIEWwithisPerps: true.Written by Cursor Bugbot for commit dc97116. This will update automatically on new commits. Configure here.