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, not license_activated_v2.
  • Every event carries anonymous and identified variants via a singleidentity_mode enum.
  • Properties are flat, typed, and documented in a shared JSON Schema registry — no nested magic blobs.

Event catalog

EventFires whenCritical props
LicenseActivatedKeyAuth handshake succeedslicense_tier, hw_fingerprint_hash
SessionStartedLoader injects payloadbuild_semver, session_id
FeatureToggledUser enables a modulefeature_flag, previous_state
HeartbeatSentPeriodic liveness pinguptime_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.