feat(predict): pass predict_feed_tab and predict_screen through to trade events cp-7.80.0#30943
Conversation
…ade events Forward the active feed tab key and screen context from PredictFeed and PredictWorldCup market cards through to the Predict Trade Transaction and Predict Market Details Opened analytics events, mirroring the existing entry_point path (card -> PredictMarketDetails route params -> buy preview -> analyticsProperties). entry_point values are unchanged. PRED-938
|
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: Key observations:
Tag selection rationale:
The changes are low-risk (additive, optional props) but the Predict buy flow and market details navigation are touched, warranting validation of the full Predict flow including confirmations. Performance Test Selection: |
Description
entry_point: "predict_feed"correctly identifies that a trade originated from the Predict feed, but it carries no information about where within the feed the trade came from. We already trackpredict_feed_tab(e.g."world-cup","trending","sports") andpredict_screen(e.g."world_cup") onPredict Feed Viewed, but those properties were never forwarded toPredict Trade TransactionorPredict Market Details Opened— so trade volume and conversion could not be segmented by tab or surface in Mixpanel.This PR forwards
predict_feed_tabandpredict_screenfrom the feed market cards through to the trade and market-details events, flowing through the same pathentry_pointalready uses:market card → PredictMarketDetails route params → PredictBuyPreview → analyticsProperties → Predict Trade TransactionWhat it does:
PredictFeedpasses the active tab key aspredict_feed_tab;PredictWorldCuppasses the active tab key pluspredict_screen: "world_cup".entry_point/transactionActiveAbTestsplumbing throughPredictMarketand the four card variants (PredictMarketSingle,PredictMarketMultiple,PredictMarketSportCard,PredictCryptoUpDownMarketCard), the navigation param types,PredictMarketDetails, andPredictBuyPreview/PredictBuyWithAnyToken.Predict Trade TransactionandPredict Market Details Opened.What does not change:
entry_pointvalues are unchanged (feed-originated trades remain"predict_feed").Changelog
CHANGELOG entry: null
Related issues
Fixes: PRED-938
Manual testing steps
Screenshots/Recordings
No UI changes — analytics-only enrichment.
Before
N/A
After
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Note
Low Risk
Analytics-only optional fields on existing navigation and event paths; no changes to trading, auth, or payment logic.
Overview
This PR threads
predict_feed_tabandpredict_screenfrom feed market cards into trade and market-details analytics, using the same optional-prop pattern asentry_pointandtransactionActiveAbTests.PredictFeedpasses the active category aspredictFeedTab;PredictWorldCuppasses the active tab pluspredict_screen: world_cup.PredictMarketforwards both props to all card variants, which include them when navigating to market details or opening the buy sheet. Route types,parseAnalyticsProperties, and buy preview screens carry the values into order analytics;PredictAnalyticsandpredictAnalyticsEventsemitpredict_feed_tab/predict_screenonPredict Trade TransactionandPredict Market Details Openedonly when set. Tests cover forwarding and property mapping.entry_pointbehavior is unchanged. Buys initiated only from the market details outcomes tab still do not get tab/screen context (called out in the PR).Reviewed by Cursor Bugbot for commit f8c4027. Bugbot is set up for automated code reviews on this repo. Configure here.