trueforge-ui-analytics · git:20261007.8d39138 · 2026-10-07 · sha256 e59d889f579986a2
trueforge-ui-analytics git:20261007.8d39138A
Immutable. This exact content never changes and is served at /api/v1/blob/e59d889f579986a2.
---
description: trueforge-ui product analytics — host sink, event catalog, container fire sites
globs: packages/trueforge-ui/src/**/*.{ts,tsx}
alwaysApply: false
---
# trueforge-ui analytics
- Host plugs `analytics.track` on `<TrueForgeUI />` (or mounts `AnalyticsProvider`). Do **not** add PostHog or other vendor SDKs in this package.
- Event names live in `src/analytics/events.ts` (`AnalyticsEvents`). New clicks add a catalog entry + fire site in the same PR.
- Prefer wrapping **container** callbacks over atom internals so visual slot overrides keep tracking.
- `useTrackAnalytics()` must no-op when unset; never throw for missing host.
- Intent comments only on the provider and non-obvious fire sites (not restating the call).