You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/tracking-events/SKILL.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ You should almost never call `useAnalytics().track` directly. The decision tree:
45
45
All declared in `src/modules/segment.types.ts` and re-exported by `src/modules/segment.ts`:
46
46
47
47
-**`SegmentEvent`** — every event name fired with `track()`. Mixed casing because some literals are historical: `'Click'`, `'Download'`, `'Reels Click …'` (Title Case Words), and the funnel events `download_started / download_success / download_failed` (snake_case). Don't normalize — the data team tracks by these literal strings.
48
-
-**`DownloadPlace`** — kebab-case enum for the `place` field of `download_*` events. Values: `landing-hero`, `landing-hero-epic`, `landing-hero-platform-switch`, `come-hang-out`, `jump-in-already-user`, `download-page`, `download-success-footer`, `unknown`.
48
+
-**`DownloadPlace`** — kebab-case enum for the `place` field of `download_*` events. 16 values incl. `landing-hero`, `landing-hero-epic`, `landing-hero-platform-switch`, `come-hang-out`, `come-hang-out-platform-switch`, `jump-in-already-user`, `play-hero`, `play-hero-epic`, `play-hero-app-store`, `play-hero-google-play`, `play-experimental-web`, `download-page`, `download-success-footer`, `creator-hub-download-page`, `creator-hub-success-page`, `unknown` — see `src/modules/segment.types.ts` for the authoritative list (it grows; don't copy this one stale).
49
49
-**`SectionViewedTrack`** — Title Case enum for the `place` field of `Click` events (consumed via `data-place`). Values: `Landing Hero`, `Creators Hero`, `Landing Explore`, etc. **Different namespace from `DownloadPlace`** — they happen to overlap in intent (e.g. `SectionViewedTrack.LANDING_HERO = 'Landing Hero'` vs `DownloadPlace.LANDING_HERO = 'landing-hero'`), but to join them in a query the warehouse has to normalize.
50
50
51
51
## 4. The `data-event` convention (Click events)
@@ -191,7 +191,14 @@ This PR instruments the blind window between the upstream `Click` and `download_
191
191
192
192
## 6.TheCreatorHubfunnel — currentstate
193
193
194
-
**Onlytheupstream`Click`istracked**, bydesign. Decision (2026-05-22):theCreatorHubflowdoesn't ship `creator_hub_download_*` outcome events because the download is `dispatch-and-forget` — we have no signal that the file actually saved, no progress, no `_FAILED` to fire. The primary download CTAs (CreatorsHero, CreatorHubDownload page) emit `Click` with `place=Creators Hero` or `place=Download` and `event=Download` via the standard `useTrackClick` adapter. The footer re-download on `/download/creator-hub-success` also fires `Click` with `place=Creator Hub Success Footer` + `data-os` so analytics can distinguish footer clicks from primary CTAs. No `page()` event on the success page.
- **`download_started`** — firedfrom`src/hooks/useCreatorHubDownload.ts` (`handleDownload`) via`createDownloadTracker(...).started()`atthemomentthefiledownloadistriggered (`place: DownloadPlace.CREATOR_HUB_DOWNLOAD_PAGE`). `revisit`ishardcoded`0` — aclickisaone-shotintent, there's no per-attempt revisit notion on this page.
198
+
- **`download_success`** — firedfrom`src/pages/download/CreatorHubDownloadSuccess.tsx`onmount (`useEffect`, guardedbyarefsoReactstrict-modedouble-invokeonlyfiresonce) via`createDownloadTracker(...).success(filename)`, `place: DownloadPlace.CREATOR_HUB_SUCCESS_PAGE`. **Semanticallythisis"the visitor reached the post-download page", not"bytes arrived"** — sitescan't observe the actual download outcome for this flow (see below), so reaching the success page is used as the completion signal. `revisit` increments per mount for the same `os:arch` (sessionStorage counter, mirrors the Explorer `DownloadSuccess` pattern).
TheCreatorHubflowis **dispatch-and-forget** (anchorclick → 3ssetTimeout → redirect). Thereisnostream, noprogress, nofailuresignalfromthebrowser. PR #619didadd`download_started`/`download_success`forthisfunnel (seesection6) — but **reusingtheshared`SegmentEvent`enum**, notanew`creator_hub_download_*`family, and **without** a`_failed`counterpart (there's nothing to catch a failure from). If a future change proposes a dedicated `CREATOR_HUB_DOWNLOAD_*` enum family or a `_failed` event for this flow, that'stheanti-patternthislessonwarnsagainst — confirmwiththedatateamfirst, don't invent a failure signal that doesn'texistinthebrowser.
262
269
263
270
### LL-2.Don't assume an event family is active — check with the data team
0 commit comments