analytics-events
Installation
SKILL.md
Frontend Analytics Events Skill
This skill helps you add product analytics (Snowplow) events to track user interactions in the Metabase frontend codebase.
Quick Reference
Analytics events in Metabase use Snowplow with typed event schemas. Simple events are declared where they are used — trackSimpleEvent is generic and validates the payload at the call site.
Key Files:
frontend/src/metabase/analytics/event.ts- Core tracking functions,trackSimpleEvent/trackSchemaEvent(import frommetabase/analytics)frontend/src/metabase-types/analytics/event.ts- The sharedSimpleEventSchemaonly. Do not add event types here (see below)frontend/src/metabase-types/analytics/schema.ts- Schema registry (custom/legacy schemas only)- Feature-specific
analytics.tsfiles - Where your tracking functions and any local types live
Quick Checklist
When adding a new analytics event: