Recipe
Analytics Events
A unified event taxonomy for every action that matters — from license activation to feature adoption. Ship instrumentation that product and growth can actually query.
Core principles
- VerbNoun naming only —
LicenseActivated, notlicense_activated_v2. - Every event carries anonymous and identified variants via a single
identity_modeenum. - Properties are flat, typed, and documented in a shared JSON Schema registry — no nested magic blobs.
Event catalog
| Event | Fires when | Critical props |
|---|---|---|
| LicenseActivated | KeyAuth handshake succeeds | license_tier, hw_fingerprint_hash |
| SessionStarted | Loader injects payload | build_semver, session_id |
| FeatureToggled | User enables a module | feature_flag, previous_state |
| HeartbeatSent | Periodic liveness ping | uptime_seconds, memory_mb |
Delivery contract
Events flush every 30 seconds or when the buffer reaches 50 entries. The edge function at /api/telemetry validates the schema, enriches with geo-IP, and fans out to Upstash streams for real-time dashboards.