Tracking plan for the DDV3 screens under src/screens/deal, following the onboarding conventions and the shared @ifgengineering/client-analytics package.
packages/client-analytics (types.ts AnalyticsActions map + the switch in index.ts that maps action keys to wire names). No local constants files.cur8:<camelObject>_<action> (e.g. cur8:dealDetails_pageViewed, cur8:onboardingQuiz_passed). Properties are snake_case.useAnalytics / useTrackEvent for interactions, useScreenView for focus-based page views. track() fans out to Mixpanel (EU) and Customer.io. app: "Cur8" and channel: "mobile" auto-attach.| Event | Props | Where |
|---|---|---|
cur8:dealDetails_pageViewed / cur8:portfolioDetails_pageViewed | investment_name, source: "DDV3" | Main screen on mount |
cur8:dealDetailsTab_clicked | deal_name | Details tab selection only (Activity direction untracked) |
cur8:dealDetailsInvest_clicked | cta: "investNow"|"addMoney", deal_name | Sticky CTA, add money, new commitment |
cur8:dealDescription_read | deal_id, max_scroll_depth_pct, time_on_page_seconds | Description screen on unmount |
cur8:earningsCalendarEntryPointClicked | deal_name, deal_id, is_investor | Earnings calendar CTA |
cur8:dealDetailsEditCommitment_clicked | deal_name, entity_name, type: "oneOff" | Payment receipt modify action |
| Activity timeline card clicked | dealName, activityType | Payment + reallocation rows only |
| Document page viewed | source: "Timeline", page: "deal docs" | Manage drawer documents |
The old screen (home/dealDetails/) fires: page view, invest clicked, watchlist toggle, earnings calendar, generate statement, deal tour. DDV3 keeps page view, invest, and earnings calendar. Watchlist, statement, and tour don't exist in DDV3, so nothing to port.
source: "DDV3" prop on shared events is what lets dashboards compare old vs new conversion. It must stay on every shared event.cur8:dealDetailsTab_clicked: fire on both directions, add tab: "details"|"activity". Also fire on swipe, not just toggle tap.cur8:dealDetailsInvestBlocked_shown { deal_id, deal_name, reason: "kyc"|"cooldown"|"onboarding"|"closed" }: fired when a blocker/verify/24h modal intercepts the invest CTA. This is the funnel drop-off we currently can't see.cur8:dealDetailsDocument_opened { deal_id, deal_name, document_title, document_category, action: "view"|"download" }: DocumentsSection rows and manage-drawer docs.cur8:dealDetailsWhyWeInvest_pageViewed { deal_id, deal_name }: supporting screen currently has no event.triggerActivityTimelineCardClicked in use-activity-routing.ts (today only payment/reallocation rows fire).cur8:dealDetailsCalculator_used { deal_id, deal_name }: first interaction with the embedded calculator per screen view (once per mount). Full-calculator link reuses existing cur8CalculatorEntryPointClicked with entry_point: "deal_details".cur8:dealDetailsVideo_played { deal_id, deal_name, video_type: "deal_video"|"webinar_replay" }cur8:dealDetailsWebinar_clicked { deal_id, deal_name, action: "register"|"replay" }cur8:dealDetailsGlossary_opened { deal_id, deal_name, term_key }cur8:dealDetailsManageHolding_opened and cur8:dealDetailsManageHolding_optionClicked { option: "manageEarnings"|"moveToIsa"|"documents"|"liquidate" }cur8:dealDetailsShariaCta_clicked { deal_id, deal_name }cur8:investmentUpdate_viewed / cur8:investmentUpdatesTab_clicked with a source: "DDV3" prop rather than new events.Pull-to-refresh, back buttons, glossary dismiss, per-tick calculator slider changes, "Show all activity" expander, holding carousel swipes, bank account prompt (child already receives analyticsLocation), Dealbot open (existing cur8:dealBot_* family covers it), IF-ISA card (existing ISA funnel events cover the next screen).
deal_id and deal_name (snake_case). Existing events keep their historical names (investment_name on page views); do not rename shipped events.source: "DDV3".is_committed: boolean and view: "details"|"activity".packages/client-analytics/src/types.ts (AnalyticsActions) and wire-name mappings to the switch in src/index.ts. Workspace symlink means no publish step for local dev.use-deal-analytics.ts in src/screens/deal that pre-binds { deal_id, deal_name, source: "DDV3" } and exposes typed trigger functions, mirroring useCommitmentAnalytics.source: "DDV3" filter before enabling FF_DEAL_DETAILS_V3 more widely.cur8:watchlist_buttonClicked already exists.cur8:dealDetailsTab_clicked change (both directions + tab prop) is additive but will shift existing dashboard counts; flag to whoever owns the dashboard.