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. |
Add MetaMetrics and Predict analytics/controller trackers for World Cup screen views, screen tab changes, banner views, and banner clicks. Track World Cup screen entry attribution with the resolved initial tab, track tab changes from the dedicated World Cup screen, and track main feed banner impressions/clicks with predict_feed attribution. Cover the new analytics paths with controller, analytics, banner, screen, deeplink attribution, and feed-session regression tests.
2aa617b
c150c15 to
2aa617b
Compare
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 2aa617b. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These are additive analytics changes scoped to the Predictions feature. The changes touch PredictController (a critical controller file) but only add new methods without modifying existing behavior. The MetaMetrics.events.ts change is purely additive. SmokePredictions is selected as the primary tag since changes directly affect Predictions views and analytics. Performance Test Selection: |
|




Description
Implements analytics instrumentation for the Predict World Cup experience so the Predict team can measure World Cup feed engagement and entry point performance during the tournament.
This PR:
Predict World Cup Screen ViewedPredict World Cup Screen Tab ChangedPredict World Cup Banner ViewedPredict World Cup Banner Clickedentry_pointand the resolved initialpredict_feed_tab.entry_pointand selectedpredict_feed_tab.entry_point: predict_feed.utm_sourcesuffixes such asdeeplink_twitter.Predict Feed Viewedsession analytics path throughPredictFeedSessionManager.Companion Segment schema changes are expected in
segment-schemafor the four new mobile events. No new mobile analytics property keys are introduced.Changelog
CHANGELOG entry: null
Related issues
Fixes: PRED-878
Manual testing steps
Screenshots/Recordings
N/A. Analytics instrumentation only; no user-facing visual changes.
Before
N/A
After
N/A
Automated testing
yarn jest app/components/UI/Predict/controllers/PredictAnalytics.test.ts app/components/UI/Predict/controllers/PredictController.test.ts app/components/UI/Predict/components/PredictWorldCupMainFeedBanner/PredictWorldCupMainFeedBanner.test.tsx app/components/UI/Predict/views/PredictWorldCup/PredictWorldCup.test.tsx app/components/UI/Predict/services/PredictFeedSessionManager.test.ts app/core/DeeplinkManager/handlers/legacy/__tests__/handlePredictUrl.test.tsyarn generate-method-action-typesyarn prettier --checkon touched filesgit diff --checkNote:
yarn lint:tscwas run and failed on unrelated existing Bridge, Trending, transaction-pay, and delegation type errors outside this change.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 Predict analytics event plumbing and emits tracking calls from the World Cup banner/screen flows, which could affect metrics accuracy and slightly impacts navigation params/session logic.
Overview
Adds World Cup-specific analytics instrumentation across Predict, including a new MetaMetrics event
PREDICT_BANNER_ACTIONand correspondingPredictAnalytics.trackBannerAction/PredictController.trackBannerActionwiring.Extends
PREDICT_FEED_VIEWEDtracking to optionally includepredict_screen, and updates the World Cup screen to generate a session id, defaultentryPointtopredict_feed, emit an initialtrackFeedViewedonce availability is resolved, and track tab changes as additional feed views (ignoring presses on the active tab).Updates the main feed World Cup banner to emit a one-time-per-mount viewed event plus a clicked event on press, and passes
entryPoint: predict_feedinto World Cup navigation; deep link tests also verify preservingutm_sourceattribution in theentryPointvalue.Reviewed by Cursor Bugbot for commit cfaafb7. Bugbot is set up for automated code reviews on this repo. Configure here.