LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

analytics-events

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

48,802stars6,749forksUpdated 8/17/2026
Web Development#frontend#react#analytics#instrumentation#typescript#metabase

Security Assessment

Safe(95/100)
Security Score95/100

About analytics-events

analytics-events is an internal Metabase engineering skill for adding product analytics (Snowplow) events that track user interactions in the Metabase frontend. It solves the problem of doing this consistently within Metabase's typed event architecture, where simple events are declared where they are used rather than registered in a central union — the generic `trackSimpleEvent` validates the payload against a shared `SimpleEventSchema` at the call site, so a missing `event` name or any out-of-schema field becomes a compile error.

The skill provides a quick reference to the key files (core tracking functions, the shared schema, the legacy schema registry, and feature-specific `analytics.ts` files) and a checklist for adding an event: pick a snake_case, past-tense event name; add a tracking function that calls `trackSimpleEvent()`; keep any field unions as local types; import and call it at the interaction point; and specifically do not add an event type to the shared types file or any union. It documents the `SimpleEventSchema` fields (event, target_id, triggered_from, duration_ms, result, event_detail) and gives worked examples for each — including timing a success/failure outcome around an async operation — plus a note that custom/legacy schemas exist but new ones are essentially never added. Its declared tools are Read, Write, Edit, Grep, and Glob.

Target users are Metabase frontend engineers adding instrumentation to features. Typical use cases include tracking clicks, opens, creates, deletes, and filter applications, and recording outcome and duration for user actions. The skill only reads and edits frontend TypeScript source to add tracking calls; it involves no destructive operations, credentials, or data exfiltration.

FAQ

What analytics system does this target?

Snowplow, via Metabase's typed event schemas. Most events use the generic `trackSimpleEvent`, which validates the payload against `SimpleEventSchema` at the call site.

Where do I declare a new event?

In the feature's own `analytics.ts` file as a tracking function that calls `trackSimpleEvent()`. You should not add the event type to `metabase-types/analytics/event.ts` or to any union — simple events are declared where they are used.

What fields does SimpleEventSchema support?

A required snake_case `event` name plus optional `target_id`, `triggered_from`, `duration_ms`, `result` (e.g. success/failure), and `event_detail`. Anything outside the schema is a compile error.

How do I record an action's outcome and duration?

Capture a start time, run the action, and call the tracking function in both success and failure paths passing `duration_ms` (now minus start) and `result`, as shown in the move-to-trash example.

What can this skill modify?

It uses Read, Write, Edit, Grep, and Glob to read and edit frontend TypeScript, adding tracking functions and their call sites. It does not touch credentials or perform destructive operations.

Install analytics-events

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

metabase/metabase

Related Skills

research

448

secops-detection-engineering

21,346

qdrant-monitoring

259

project-architecture

3