Agent skill · data analytics · metabase

analytics-events

Add product analytics events to track user interactions in the Metabase frontend

Why this skill is useful

Provides specific patterns for integrating Snowplow analytics events in the Metabase frontend, which the AI wouldn't reliably generate on its own.

What it needs

About 7k tokens when loaded. Last updated 2026-08-07. 48,568 stars on the source repository.

What this skill does

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 from metabase/analytics) frontend/src/metabase-types/analytics/event.ts - The shared SimpleEventSchema only. Do not add event types here (see below) frontend/src/metabase-types/analytics/schema.ts - Schema registry (custom/legacy schemas only) Feature-specific analytics.ts files - Where your tracking functions and any local types live Quick Checklist When adding a new analytics event: [ ] Pick an event name (snakecase, past tense) [ ] Add a tracking function to the feature's analytics.ts file, calling trackSimpleEvent() [ ] Keep any field unions (e.g. "success" "failure") as local types in that same file [ ] Import and call the tracking function at the interaction point [ ] Do not add an event type to metabase-types/analytics/event.ts or to any union Event Schema Types 1. Simple Events (Most Common) Use SimpleEventSchema for straightforward tracking. It supports these standard fields: When to use: 90% of events fit this schema. Use for clicks, opens, closes, creates, deletes, etc. trackSimpleEvent is generic and enforces this schema on the object literal you pass it: That means a missing event or any field outside SimpleEventSchema is a compile error at the call site. There is no separate event type to declare and no satisfies clause to add — the old ValidateEvent<...> helper is no longer exported and is not part of the workflow. trackSchemaEvent is generic too: it correlates the schema name with the payload type, so you can't send a dashboard event under the simpleevent schema. 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills metabase/analytics-events

View the source on GitHub

Browse the @skills marketplace