feat(predict): cp-7.63.0 add game properties to analytics events#25065
feat(predict): cp-7.63.0 add game properties to analytics events#25065
Conversation
- Add market_slug, game_id, game_start_time, game_league, game_status, game_period, and game_clock properties to PREDICT_MARKET_DETAILS_OPENED and PREDICT_TRADE_TRANSACTION events - Add SHARE_ACTION event tracking with status (initiated/success/failed), market_id, and market_slug properties - Update PredictController with trackShareAction method - Pass game properties through Buy/Sell preview flows - Add analytics tracking to PredictShareButton component - Add tests for share button analytics tracking
|
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. |
- Update dismissed share test to expect FAILED tracking - Add call count and SUCCESS verification for undefined marketSlug test
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsAll changes are confined to the
The changes are:
The PredictController is marked as CRITICAL because it contains "Controller" in the name, but the actual changes are minimal analytics additions that don't affect the core prediction functionality. No changes to navigation, shared components, or other features. SmokePredictions is the appropriate tag as it tests "Polymarket prediction market integration" including "opening new positions on available markets" and "the Positions tab for viewing all open positions" - which would exercise the modified components (PredictMarketDetails, PredictBuyPreview, PredictSellPreview). |
|




Description
Add new analytics properties to Predict market events to improve tracking for sports/game-based prediction markets:
PREDICT_MARKET_DETAILS_OPENED and PREDICT_TRADE_TRANSACTION events now include:
market_slug- Market slug identifiergame_id- Game identifiergame_start_time- Game start timestampgame_league- League name (e.g., "NBA", "NFL")game_status- Game status (e.g., "not_started", "live", "final")game_period- Current game period (nullable)game_clock- Current game clock (nullable)SHARE_ACTION event tracking added for share button interactions:
status- Share status: "initiated", "success", or "failed"market_id- Market identifiermarket_slug- Market slugThese changes align with the Segment schema updates in segment-schema PR #429.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
N/A - Analytics only change, no UI modifications
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Enhances Predict analytics coverage for sports markets and share interactions.
PREDICT_TRADE_TRANSACTIONandPREDICT_MARKET_DETAILS_OPENEDwithmarket_slug,game_id,game_start_time,game_league,game_status,game_period,game_clockPredictController.trackShareActionand wiresPredictShareButtonto trackinitiated→success/failed(includesmarket_idand optionalmarket_slug)marketSlugintoPredictShareButtonin market/game detail viewsWritten by Cursor Bugbot for commit 4c8b0b8. This will update automatically on new commits. Configure here.