spawn/sh/cli
Ahmed Abushagur 51e36d2154
feat(telemetry): install referrer attribution for growth channels (#3318)
Tracks whether installs came from Reddit, X, or organic by baking a
ref tag into the install command.

Growth bot shares:
  curl -fsSL ... | SPAWN_REF=reddit bash
  curl -fsSL ... | SPAWN_REF=x bash

install.sh: if SPAWN_REF is set, sanitizes it (alphanumeric + hyphens,
max 32 chars) and writes to ~/.config/spawn/.ref. Only written once —
never overwritten on updates.

index.ts: on startup, reads .ref and sets it as telemetry context via
setTelemetryContext("ref", ref). Every PostHog event (funnel, lifecycle,
errors) now carries ref=reddit or ref=x for attributed installs, or no
ref for organic.

PostHog query: filter any event by ref=reddit to see "how many Reddit-
sourced users made it through the funnel" vs organic.

Bumps 1.0.15 -> 1.0.16.

Co-authored-by: A <258483684+la14-1@users.noreply.github.com>
2026-04-18 00:59:22 -07:00
..
install.ps1 refactor: remove packages/shared, deduplicate with CLI shared (#2257) 2026-03-06 21:58:42 -05:00
install.sh feat(telemetry): install referrer attribution for growth channels (#3318) 2026-04-18 00:59:22 -07:00