analytics
The facts
Its description
When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "Mixpanel," "Segment," "are my events firing," or "analytics isn't working." Use this whenever someone asks how to know if something is working or wants to measure marketing results. For getting conversions into ad platforms (pixels, conversion tags, CAPI, server-side) and verifying they arrived, see conversion-tracking. For choosing attribution models, comparing multi-touch/MMM/incrementality, or reconciling conflicting numbers across tools, see attribution. For A/B test measurement, see ab-testing. Rate metrics divide matching closed windows — never full-period spend by partial-period results.
The description the agent reads to decide when to use it.
When it starts
The agent picks this skill when someone wants to set up, audit, or fix analytics tracking and measurement — GA4/GTM implementation, event and UTM naming, tracking plans, or debugging events that aren't firing. It also fires on vague measurement asks like "how do I know if this is working."
Things a person might say (the model's guesses)
- “How do I set up GA4 event tracking for our signup flow?”
- “My GTM tags aren't firing — can you help me debug the tracking?”
- “Can you put together a tracking plan for our marketing site?”
A model's summary of when it is used.
Files it mentions
references/event-library.md, references/ga4-implementation.md, references/gtm-implementation.md
Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.
What it leads to
- an alternative: ab-testing for A/B test measurement line 3
- an alternative: ai-seo for measuring the full AI-assistant effect line 257
- an alternative: attribution for attribution models and reconciling conflicting numbers line 3
- an alternative: conversion-tracking for getting conversions into ad platforms line 3
- an alternative: cro for conversion optimization line 369
- an alternative: influencer-marketing for the rest of partner measurement line 247
- an alternative: revops for pipeline metrics and CRM tracking line 370
- an alternative: seo-audit for organic traffic analysis line 368
Other skills this one hands off to, calls, requires or offers instead, as a model read them.
What leads to it
- reverse-engineer-marketing hands off to this when the user can't measure the metric today reverse-engineer-marketing/play-routing.md, line 54
- ai-seo calls this ai-seo/ai-attribution.md, line 19
- free-tools calls this when measuring tool usage free-tools, line 190
- influencer-marketing calls this for the UTM pattern on every placement influencer-marketing, line 133
- marketing-loops calls this marketing-loops/loop-catalog.md, line 38
- attribution requires this attribution, line 223
- conversion-tracking is an alternative to this for tracking plans, UTMs, or general GTM craft conversion-tracking, line 164
Other skills that hand off to this one, call it, require it or offer it instead, as a model read them.
Names skills outside this collection
- link-creator line 249
Skills the text names that are not in this collection, as a model read them.
Licence
MIT, from LICENSE
The terms its author shares it under, which let it be shown here.
Other settings
metadata: version: 2.2.2
More settings at the top of the file, shown as written.
Other files in this skill (4) Close
The text
Most marks come from matching words in the file, so treat them as pointers.
Analytics Tracking
You are an expert in analytics implementation and measurement. Your goal is to help set up tracking that provides actionable insights for marketing and product decisions.
Raw lines 1 to 11Initial Assessment
Check for product marketing context first: If .agents/product-marketing.md exists (or .claude/product-marketing.md, or the legacy product-marketing-context.md filename, in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.
Before implementing tracking, understand:
- Business Context - What decisions will this data inform? What are key conversions?
- Current State - What tracking exists? What tools are in use?
- Technical Context - What's the tech stack? Any privacy/compliance requirements?
Raw lines 12 to 24
Core Principles
Raw lines 25 to 261. Track for Decisions, Not Data
- Every event should inform a decision
- Avoid vanity metrics
- Quality > quantity of events
2. Start with the Questions
- What do you need to know?
- What actions will you take based on this data?
- Work backwards to what you need to track
3. Name Things Consistently
- Naming conventions matter
- Establish patterns before implementing
- Document everything
4. Maintain Data Quality
- Validate implementation
- Monitor for issues
- Clean data > more data
5. Compute, Don't Eyeball
- Derive every total, rate, and delta from row-level data with a script or spreadsheet — never by scanning rows and summing mentally. One silently dropped row corrupts every figure downstream of it.
- Cross-check each headline figure a second, independent way (a reconciliation total, a recomputation from a different grouping) before reporting it, and chase any mismatch to the exact row.
- When a claim is about one segment — a single campaign, ad set, channel, or week — report that segment's own numbers. Never fold it into a neighboring group and let the group's total speak for it.
6. Match Observation Windows
- A rate or efficiency metric divides a numerator and denominator that cover the same closed observation window. Never divide a full period's spend by a partial period's conversions or revenue — restate both over the weeks that actually have data, and say which weeks those are.
- Cohort rates use only cohorts whose observation window has ended. A trial or signup still inside its window is pending, not failed — exclude it from the denominator and label it as pending rather than counting it against the rate.
7. Recommend Against the Stated Goal
- Analysis ends in a recommendation, and the recommendation must be argued from the goal the brief states — the launch target, audience, revenue, or positioning objective — not only from what is operationally easiest. Name which stated goal each option serves and what it trades away.
Raw lines 68 to 75
Tracking Plan Framework
Raw lines 76 to 77Structure
Event Name | Category | Properties | Trigger | Notes
---------- | -------- | ---------- | ------- | -----Raw lines 78 to 84Event Types
| Type | Examples |
|---|---|
| Pageviews | Automatic, enhanced with metadata |
| User Actions | Button clicks, form submissions, feature usage |
| System Events | Signup completed, purchase, subscription changed |
| Custom Conversions | Goal completions, funnel stages |
For comprehensive event lists: See references/event-library.md
Raw lines 85 to 97
Event Naming Conventions
Raw lines 98 to 99Recommended Format: Object-Action
signup_completed
button_clicked
form_submitted
article_read
checkout_payment_completedRaw lines 100 to 109Best Practices
- Lowercase with underscores
- Be specific:
cta_hero_clickedvs.button_clicked - Include context in properties, not event name
- Avoid spaces and special characters
- Document decisions
- Keep provider-defined names when using automatic or recommended events (e.g. GA4
click,view_search_results,purchase). Map internal business names explicitly; naming a custom event does not make the provider collect it automatically.
Raw lines 110 to 119
Essential Events
Raw lines 120 to 121Marketing Site
| Event | Properties |
|---|---|
| cta_clicked | button_text, location |
| form_submitted | form_type |
| signup_completed | method, source |
| demo_requested | - |
Product/App
| Event | Properties |
|---|---|
| onboarding_step_completed | step_number, step_name |
| feature_used | feature_name |
| purchase_completed | plan, value |
| subscription_cancelled | reason |
For full event library by business type: See references/event-library.md
Raw lines 131 to 143
Event Properties
Raw lines 144 to 145Standard Properties
| Category | Properties |
|---|---|
| Page | page_title, page_location, page_referrer |
| User | user_id, user_type, account_id, plan_type |
| Campaign | source, medium, campaign, content, term |
| Product | product_id, product_name, category, price |
Best Practices
- Use consistent property names
- Include relevant context
- Don't duplicate automatic properties
- Avoid PII in properties
Raw lines 155 to 162
GA4 Implementation
Raw lines 163 to 164Quick Setup
- Create GA4 property and data stream
- Install gtag.js or GTM
- Enable enhanced measurement
- Configure custom events
- Mark conversions in Admin
Event Example
// GA4's recommended sign_up event, not a custom name, so it feeds built-in reports.
// Your tracking plan can still call this signup_completed; map the name explicitly.
gtag('event', 'sign_up', {
'method': 'email',
'plan': 'free'
});For detailed GA4 implementation: See references/ga4-implementation.md
Raw lines 173 to 187
Google Tag Manager
Raw lines 188 to 189Container Structure
| Component | Purpose |
|---|---|
| Tags | Code that executes (GA4, pixels) |
| Triggers | When tags fire (page view, click) |
| Variables | Dynamic values (click text, data layer) |
Data Layer Pattern
dataLayer.push({
'event': 'form_submitted',
'form_name': 'contact',
'form_location': 'footer'
});For detailed GTM implementation: See references/gtm-implementation.md
Raw lines 198 to 211
UTM Parameter Strategy
Raw lines 212 to 213Standard Parameters
| Parameter | Purpose | Example |
|---|---|---|
| utm_source | Traffic source | google, newsletter |
| utm_medium | Marketing medium | cpc, email, social |
| utm_campaign | Campaign name | spring-sale |
| utm_content | Differentiate versions | hero-cta |
| utm_term | Paid search keywords | running-shoes |
Naming Conventions
- Lowercase everything. GA4 treats
LinkedInandlinkedinas two sources, and the split never merges back. - Hyphens between words. No spaces, underscores, or
+. Pick one separator for the whole company; this skill uses hyphens. - One spelling per source.
linkedin, never alsoliorlinkedin.com. Keep the allowed values in a shared sheet and build links from it. - No personal data. Never put emails, names, phone numbers, or user IDs in a UTM. They land in analytics reports and in referrer logs, and Google's terms prohibit sending PII to GA4.
- Specific but short:
blog-footer-cta, notcta1. - Test the final URL. Shorteners and redirects can drop or double parameters. Click the live link and check the landing URL before the campaign ships.
UTM Patterns by Partner Type
Partner links break most often because each deal gets named on the spot. Fix the pattern per partner type once: utm_medium names the kind of deal, utm_source names who sent the traffic.
| Partner type | utm_source | utm_medium | utm_campaign | utm_content |
|---|---|---|---|---|
| Newsletter | {partner} (one per partner, across all their publications) | newsletter | {partner}-{publication}-{yyyy}-{mm} | {placement}-{yyyy-mm-dd} |
| Creator (YouTube, LinkedIn, TikTok) | {platform} | creator | {creator} | {post-date} or the video ID |
| Podcast | {podcast} | podcast | {podcast}-{yyyy}-{mm} | {spot}-{yyyy-mm-dd} (pre-roll, mid-roll) |
| Affiliate | {partner} | affiliate | {partner}-affiliate | placement, if they have several |
| Community | {community} | community | {community}-{program} | the channel or post, if known |
- **Use
creatoras the medium for paid creator deals**, notsocial(which mixes them with your organic posts) orvideo(which mixes them with paid video ads). The platform goes inutm_source. - One link per placement. A newsletter that runs you on two dates gets two links, so each date's clicks stay separate. The monthly
utm_campaignrolls them up. - Add a custom channel group in GA4. GA4's default grouping sends mediums like
newsletter,creator,podcast, andcommunityto Unassigned (onlyaffiliateandemailmap to a default channel). Create a channel group with a rule per medium so partner traffic shows up as its own channels. - Podcast and video links often aren't clickable, so pair the UTM link with a promo code or vanity URL. See influencer-marketing for the rest of partner measurement.
The partner-type pattern is adapted from Wispr Flow's link-creator skill (MIT), published in the skills.marketing library.
Raw lines 232 to 250Traffic From AI Assistants
You can't tag links that ChatGPT, Claude, Perplexity, Gemini, or Copilot put in their answers. Some of those visits arrive with a referrer (chatgpt.com, perplexity.ai) or an assistant-added utm_source; many arrive as direct, or come later through a branded search.
- Add a GA4 channel group rule that matches known assistant referrers and sources into an "AI assistants" channel, and update the list as new assistants appear.
- Treat that channel as the floor. Assistant-driven visits that show up as direct or branded search can be most of the effect, and they won't carry the referrer.
- For measuring the full effect (exposure, delayed visits, and longer attribution windows), see ai-seo. For reconciling it with other sources, see attribution.
Raw lines 251 to 260
Debugging and Validation
Raw lines 261 to 262Testing Tools
| Tool | Use For |
|---|---|
| GA4 DebugView | Real-time event monitoring |
| GTM Preview Mode | Test triggers before publish |
| Browser Extensions | Tag Assistant, dataLayer Inspector |
Validation Checklist
- [ ] Events firing on correct triggers
- [ ] Property values populating correctly
- [ ] No duplicate events
- [ ] Works across browsers and mobile
- [ ] Conversions recorded correctly
- [ ] No PII leaking
Common Issues
| Issue | Check |
|---|---|
| Events not firing | Trigger config, GTM loaded |
| Wrong values | Variable path, data layer structure |
| Duplicate events | Multiple containers, trigger firing twice |
Raw lines 280 to 289
Privacy and Compliance
Raw lines 290 to 291Considerations
- Cookie consent required in EU/UK/CA
- No PII in analytics properties
- Data retention settings
- User deletion capabilities
Implementation
- Use consent mode (wait for consent)
- IP anonymization
- Only collect what you need
- Integrate with consent management platform
Raw lines 298 to 305
Output Format
Raw lines 306 to 307Tracking Plan Document
# [Site/Product] Tracking Plan
## Overview
- Tools: GA4, GTM
- Last updated: [Date]
## Events
| Event Name | Description | Properties | Trigger |
|------------|-------------|------------|---------|
| signup_completed | User completes signup | method, plan | Success page |
## Custom Dimensions
| Name | Scope | Parameter |
|------|-------|-----------|
| user_type | User | user_type |
## Conversions
| Conversion | Event | Counting |
|------------|-------|----------|
| Signup | signup_completed | Once per session |Raw lines 308 to 337
Task-Specific Questions
- What tools are you using (GA4, Mixpanel, etc.)?
- What key actions do you want to track?
- What decisions will this data inform?
- Who implements - dev team or marketing?
- Are there privacy/consent requirements?
- What's already tracked?
Raw lines 338 to 348
Tool Integrations
For implementation, see the tools registry. Key analytics tools:
| Tool | Best For | MCP | Guide |
|---|---|---|---|
| GA4 | Web analytics, Google ecosystem | ✓ | ga4.md |
| Mixpanel | Product analytics, event tracking | - | mixpanel.md |
| Amplitude | Product analytics, cohort analysis | - | amplitude.md |
| PostHog | Open-source analytics, session replay | - | posthog.md |
| Segment | Customer data platform, routing | - | segment.md |
Raw lines 349 to 362
Related Skills
- ab-testing: For experiment tracking
- conversion-tracking: For getting conversions (including GA4 key events from forms and bookings) to ad platforms and GA4, and verifying they arrive
- attribution: For attribution models, multi-touch/MMM/incrementality, and reconciling conflicting numbers across tools (once tracking is live)
- seo-audit: For organic traffic analysis
- cro: For conversion optimization (uses this data)
- revops: For pipeline metrics, CRM tracking, and revenue attribution
From coreyhaines31/marketingskills at 88c79f6, 2026-10-30. Skills read by DeepSeek V4.1 Flash on 2026-11-04. Summary and techniques by Claude Opus 5.5 on 2026-11-06.