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
+31-8Lines changed: 31 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,11 +146,13 @@ Marketing shares links like `https://decentraland.org/download?utm_source=shefi&
146
146
enum DownloadTarget {
147
147
DESKTOP_INSTALLER = 'desktop_installer',
148
148
APP_STORE = 'app_store',
149
-
GOOGLE_PLAY = 'google_play'
149
+
GOOGLE_PLAY = 'google_play',
150
+
EPIC = 'epic',
151
+
CREATOR_HUB = 'creator_hub'
150
152
}
151
153
```
152
154
153
-
Setvia`data-download-target={DownloadTarget.X}`oneverydownloadCTA (Hero, ComeHangOut, DownloadOptions, DownloadLayout's mobile store badges, PlayPage) and read into payloads by `useDownloadClick` / `buildTrackerExtra` (below).
155
+
Setvia`data-download-target={DownloadTarget.X}`oneverydownloadCTA (Hero, ComeHangOut, DownloadOptions, DownloadLayout's mobile store badges, PlayPage, Creator Hub CTAs) and read into payloads by `useDownloadClick`, `useTrackClick`, and `buildTrackerExtra` (below).
154
156
155
157
**`src/modules/url.ts` — `DownloadSuccessHrefOptions.campaignParams`:** theparam-assemblyloopin`buildDownloadSuccessHref`guardsagainstacampaignkeyclobberingaroutingparam:`if (params.has(key)) continue`before`params.set(key, value)`, sono`utm_*`canoverwrite`os`/`place`/`arch`/`anon_user_id`. Unreachabletoday (the`utm_*`allowlistin`collectCampaignParams`can't collide with those names), but the option accepts a bare `Record<string, string>` so a future caller passing raw `searchParams` entries can'tcorruptthe funnel.
156
158
@@ -159,15 +161,34 @@ Set via `data-download-target={DownloadTarget.X}` on every download CTA (Hero, C
159
161
**`src/pages/DownloadSuccess/DownloadSuccess.tsx` — `buildTrackerExtra()`:** buildstheshared`extra`objectmergedintoevery`download_started/_success/_failed`payload (`downloadTracking.ts`'s `buildBasePayload` spreads `ctx.extra` first, so core schema fields still win on collision):
wrappedinatry/catch (line ~127-140) becauseitrunsintwoplacesthatmustneverthrow:thefooterre-downloadhandler (beforeitstry/finallyarms) andthemounteffect's catch (while building the `_FAILED` fallback tracker). **The catch block only returns `{ download_target: DownloadTarget.DESKTOP_INSTALLER }`** — see P2-4 below, this silently drops the campaign params for that one event if `collectClientFingerprint()` throws.
**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.
@@ -228,7 +249,7 @@ If grep returns zero matches the enum value is **dead code** — verify with a r
- **P2-4** (open, foundduringPR #654 review, notfixed — documentingonly):`DownloadSuccess.tsx`'s `buildTrackerExtra()` (~line 127) merges `collectClientFingerprint()` + `campaignParamsRef.current` + `download_target`, wrapped in a try/catch because it must never throw (see 5.5). If `collectClientFingerprint()` throws, the catch returns **only** `{ download_target: DownloadTarget.DESKTOP_INSTALLER }` — the campaign params (`utm_*`) captured in `campaignParamsRef.current` are silently dropped from that event, even though they don'tdependonthethingthatfailed. Fixwouldbecatchingaroundjustthefingerprintcallandstillspreading`campaignParamsRef.current`unconditionally, butthat's a design decision for whoever picks this up, not done here.
0 commit comments