Defines analytics instrumentation standards including event taxonomy, tracker ID conventions, and per-feature instrumentation plans for measurable product development.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Defines analytics instrumentation standards including event taxonomy, tracker ID conventions, and per-feature instrumentation plans for measurable product development.
Outputs: event taxonomy (standards/analytics/), tracker conventions (standards/analytics/), per-feature instrumentation plan
Used by: Engineering Agent
Tool scripts: ./tools/artifact/validate.sh
Purpose
Define analytics instrumentation standards so every feature ships with measurable events, consistent tracker IDs, and clear mappings from PRD success metrics to trackable data points. This skill produces the event taxonomy, tracker attribute conventions, and per-feature instrumentation plans that engineering uses during implementation.
When to Use
Setting up analytics for a new product or codebase
Building a new feature that has success metrics in its PRD
Auditing existing instrumentation for gaps or inconsistencies
Onboarding a new analytics provider
Instrumentation Procedure
Step 0: Provider Selection
If analytics.provider is empty or not configured in company.config.yaml, present a provider selection guide before generating the event taxonomy:
Provider
Best For
Free Tier
Self-Hosted
PostHog
Product analytics + session replay
1M events/month
Yes
Plausible
Privacy-first web analytics
None (paid)
Yes
Mixpanel
Event-based product analytics
20M events/month
No
Segment
Data routing to multiple tools
1K users/month
No
Walk the user through updating company.config.yaml before proceeding.
The event_prefix from config is prepended to the event name when sent to the analytics provider (e.g., if prefix is app_ and event is user.signed_up, the provider receives app_user.signed_up).
Event Categories
Category
When to Use
Examples
page_view
User navigates to a page/screen
page.viewed
user_action
User performs an intentional action
button.clicked, form.submitted
system_event
System-initiated events
email.sent, job.completed
business_event
Revenue and conversion events
subscription.started, payment.completed
Anti-Patterns
No PII in event properties: Never include email, name, phone, IP address, or any personally identifiable information as event property values
No high-cardinality values: Never use full URLs, raw UUIDs, free-text input, or timestamps as property values (use categories, slugs, or enums instead)
No deep nesting: Event properties must not nest objects deeper than 2 levels
No ambiguous names: clicked alone is meaningless -- always pair with the object (button.clicked, link.clicked)
No future tense: Events record what happened, not what will happen (user.signed_up, not user.signing_up)
Step 3: Generate Tracker ID Conventions
Produce standards/analytics/tracker-conventions.md with the following structure:
Analytics Tracking Attribute
Attribute: Uses the value from analytics.tracker_attribute in config (default: data-track-id)
Format: data-track-id="<page>-<element>-<action>"
Rules:
Lowercase throughout
Hyphens (-) between segments (page, element, action)
Underscores (_) within segments for multi-word names
Every interactive element (button, link, form input, toggle, dropdown, checkbox) MUST have a tracker ID
Note: The analytics.tracker_attribute value in company.config.yaml determines the primary attribute name. If the config specifies data-analytics instead of data-track-id, all examples above should use data-analytics as the attribute name.
Step 4: Per-Feature Instrumentation
For each feature being built:
Read PRD success metrics -- extract every measurable goal
Map each metric to specific events that prove or disprove it:
Identify the event(s) needed to calculate the metric
Define event names following the taxonomy
Define event properties specific to the feature
List all new UI components that need tracker IDs:
Buttons, links, form fields, toggles, tabs, modals
Apply the naming convention from Step 3
Define dashboard requirements:
What graphs to create (line chart for trends, bar chart for comparisons, funnel for conversion)
What metrics to display (counts, rates, durations, percentages)
What alerts to configure (thresholds, anomaly detection)
Example mapping:
Success metric from PRD: "80% of users complete onboarding within 5 minutes"
Grep the codebase for existing tracker attributes and event calls:
Find existing tracker attributes: Search for data-track-id, data-sentry-component, data-tour-step (and the configured analytics.tracker_attribute if different)
Find existing event calls: Search for the analytics provider's track/send function (e.g., analytics.track(, mixpanel.track(, posthog.capture()
Identify gaps:
Interactive components missing tracker IDs
Events defined in the taxonomy but not instrumented in code
Events in code that do not follow the naming convention
Inconsistent property names across similar events
Produce an audit summary listing each gap with its file location and recommended fix