Analytics Tracking
When to Use
Use this skill when you need 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," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "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.
Initial 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?
Core Principles
1. 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
Tracking Plan Framework
Structure
Event Name | Category | Properties | Trigger | Notes
---------- | -------- | ---------- | ------- | -----
Event 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
Event Naming Conventions
Recommended Format: Object-Action
signup_completed
button_clicked
form_submitted
article_read
checkout_payment_completed
Best Practices
- Lowercase with underscores
- Be specific:
cta_hero_clicked vs. button_clicked
- Include context in properties, not event name
- Avoid spaces and special characters
- Document decisions
Essential Events
Marketing 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
Event Properties
Standard 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
GA4 Implementation
Quick Setup
- Create GA4 property and data stream
- Install gtag.js or GTM
- Enable enhanced measurement
- Configure custom events
- Mark conversions in Admin
Custom Event Example
gtag('event', 'signup_completed', {
'method': 'email',
'plan': 'free'
});
For detailed GA4 implementation: See references/ga4-implementation.md
Google Tag Manager
Container 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
UTM Parameter Strategy
Standard 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
- Use underscores or hyphens consistently
- Be specific but concise:
blog_footer_cta, not cta1
- Document all UTMs in a spreadsheet
Debugging and Validation
Testing 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
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 |
Privacy and Compliance
Considerations
- 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
Output Format
Tracking 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 |
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?
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 |
Related Skills
- ab-testing: For experiment tracking
- seo-audit: For organic traffic analysis
- cro: For conversion optimization (uses this data)
- revops: For pipeline metrics, CRM tracking, and revenue attribution
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Source: sickn33/agentic-awesome-skills → skills/analytics/SKILL.md
Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/analytics/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/analytics/SKILL.md
1---2name: analytics-23description: "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,\" \"conversion tracking,\" \"event tracking,\" \"UTM parameters,\" \"tag manager,\" \"GTM,\" \"analytics implementation,\" \"tracking..."4category: security-and-compliance5source_repo: sickn33/agentic-awesome-skills6source_path: "skills/analytics/SKILL.md"7source_url: https://github.com/sickn33/agentic-awesome-skills/blob/HEAD/skills/analytics/SKILL.md8metadata:9 source: https://skillmd.com/skills/thedixitjain/analytics-210---111213# Analytics Tracking14## When to Use1516Use this skill when you need 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," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking...171819You 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.2021## Initial Assessment2223**Check for product marketing context first:**24If `.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.2526Before implementing tracking, understand:27281. **Business Context** - What decisions will this data inform? What are key conversions?292. **Current State** - What tracking exists? What tools are in use?303. **Technical Context** - What's the tech stack? Any privacy/compliance requirements?3132---3334## Core Principles3536### 1. Track for Decisions, Not Data37- Every event should inform a decision38- Avoid vanity metrics39- Quality > quantity of events4041### 2. Start with the Questions42- What do you need to know?43- What actions will you take based on this data?44- Work backwards to what you need to track4546### 3. Name Things Consistently47- Naming conventions matter48- Establish patterns before implementing49- Document everything5051### 4. Maintain Data Quality52- Validate implementation53- Monitor for issues54- Clean data > more data5556---5758## Tracking Plan Framework5960### Structure6162```63Event Name | Category | Properties | Trigger | Notes64---------- | -------- | ---------- | ------- | -----65```6667### Event Types6869| Type | Examples |70|------|----------|71| Pageviews | Automatic, enhanced with metadata |72| User Actions | Button clicks, form submissions, feature usage |73| System Events | Signup completed, purchase, subscription changed |74| Custom Conversions | Goal completions, funnel stages |7576**For comprehensive event lists**: See [references/event-library.md](references/event-library.md)7778---7980## Event Naming Conventions8182### Recommended Format: Object-Action8384```85signup_completed86button_clicked87form_submitted88article_read89checkout_payment_completed90```9192### Best Practices93- Lowercase with underscores94- Be specific: `cta_hero_clicked` vs. `button_clicked`95- Include context in properties, not event name96- Avoid spaces and special characters97- Document decisions9899---100101## Essential Events102103### Marketing Site104105| Event | Properties |106|-------|------------|107| cta_clicked | button_text, location |108| form_submitted | form_type |109| signup_completed | method, source |110| demo_requested | - |111112### Product/App113114| Event | Properties |115|-------|------------|116| onboarding_step_completed | step_number, step_name |117| feature_used | feature_name |118| purchase_completed | plan, value |119| subscription_cancelled | reason |120121**For full event library by business type**: See [references/event-library.md](references/event-library.md)122123---124125## Event Properties126127### Standard Properties128129| Category | Properties |130|----------|------------|131| Page | page_title, page_location, page_referrer |132| User | user_id, user_type, account_id, plan_type |133| Campaign | source, medium, campaign, content, term |134| Product | product_id, product_name, category, price |135136### Best Practices137- Use consistent property names138- Include relevant context139- Don't duplicate automatic properties140- Avoid PII in properties141142---143144## GA4 Implementation145146### Quick Setup1471481. Create GA4 property and data stream1492. Install gtag.js or GTM1503. Enable enhanced measurement1514. Configure custom events1525. Mark conversions in Admin153154### Custom Event Example155156```javascript157gtag('event', 'signup_completed', {158 'method': 'email',159 'plan': 'free'160});161```162163**For detailed GA4 implementation**: See [references/ga4-implementation.md](references/ga4-implementation.md)164165---166167## Google Tag Manager168169### Container Structure170171| Component | Purpose |172|-----------|---------|173| Tags | Code that executes (GA4, pixels) |174| Triggers | When tags fire (page view, click) |175| Variables | Dynamic values (click text, data layer) |176177### Data Layer Pattern178179```javascript180dataLayer.push({181 'event': 'form_submitted',182 'form_name': 'contact',183 'form_location': 'footer'184});185```186187**For detailed GTM implementation**: See [references/gtm-implementation.md](references/gtm-implementation.md)188189---190191## UTM Parameter Strategy192193### Standard Parameters194195| Parameter | Purpose | Example |196|-----------|---------|---------|197| utm_source | Traffic source | google, newsletter |198| utm_medium | Marketing medium | cpc, email, social |199| utm_campaign | Campaign name | spring_sale |200| utm_content | Differentiate versions | hero_cta |201| utm_term | Paid search keywords | running+shoes |202203### Naming Conventions204- Lowercase everything205- Use underscores or hyphens consistently206- Be specific but concise: `blog_footer_cta`, not `cta1`207- Document all UTMs in a spreadsheet208209---210211## Debugging and Validation212213### Testing Tools214215| Tool | Use For |216|------|---------|217| GA4 DebugView | Real-time event monitoring |218| GTM Preview Mode | Test triggers before publish |219| Browser Extensions | Tag Assistant, dataLayer Inspector |220221### Validation Checklist222223- [ ] Events firing on correct triggers224- [ ] Property values populating correctly225- [ ] No duplicate events226- [ ] Works across browsers and mobile227- [ ] Conversions recorded correctly228- [ ] No PII leaking229230### Common Issues231232| Issue | Check |233|-------|-------|234| Events not firing | Trigger config, GTM loaded |235| Wrong values | Variable path, data layer structure |236| Duplicate events | Multiple containers, trigger firing twice |237238---239240## Privacy and Compliance241242### Considerations243- Cookie consent required in EU/UK/CA244- No PII in analytics properties245- Data retention settings246- User deletion capabilities247248### Implementation249- Use consent mode (wait for consent)250- IP anonymization251- Only collect what you need252- Integrate with consent management platform253254---255256## Output Format257258### Tracking Plan Document259260```markdown261# [Site/Product] Tracking Plan262263## Overview264- Tools: GA4, GTM265- Last updated: [Date]266267## Events268269| Event Name | Description | Properties | Trigger |270|------------|-------------|------------|---------|271| signup_completed | User completes signup | method, plan | Success page |272273## Custom Dimensions274275| Name | Scope | Parameter |276|------|-------|-----------|277| user_type | User | user_type |278279## Conversions280281| Conversion | Event | Counting |282|------------|-------|----------|283| Signup | signup_completed | Once per session |284```285286---287288## Task-Specific Questions2892901. What tools are you using (GA4, Mixpanel, etc.)?2912. What key actions do you want to track?2923. What decisions will this data inform?2934. Who implements - dev team or marketing?2945. Are there privacy/consent requirements?2956. What's already tracked?296297---298299## Tool Integrations300301For implementation, see the [tools registry](https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics/../../tools/REGISTRY.md). Key analytics tools:302303| Tool | Best For | MCP | Guide |304|------|----------|:---:|-------|305| **GA4** | Web analytics, Google ecosystem | ✓ | [ga4.md](https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics/../../tools/integrations/ga4.md) |306| **Mixpanel** | Product analytics, event tracking | - | [mixpanel.md](https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics/../../tools/integrations/mixpanel.md) |307| **Amplitude** | Product analytics, cohort analysis | - | [amplitude.md](https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics/../../tools/integrations/amplitude.md) |308| **PostHog** | Open-source analytics, session replay | - | [posthog.md](https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics/../../tools/integrations/posthog.md) |309| **Segment** | Customer data platform, routing | - | [segment.md](https://github.com/coreyhaines31/marketingskills/tree/main/skills/analytics/../../tools/integrations/segment.md) |310311---312313## Related Skills314315- **ab-testing**: For experiment tracking316- **seo-audit**: For organic traffic analysis317- **cro**: For conversion optimization (uses this data)318- **revops**: For pipeline metrics, CRM tracking, and revenue attribution319320## Limitations321322- Use this skill only when the task clearly matches its upstream source and local project context.323- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.324- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.325326---327328**Source:** [`sickn33/agentic-awesome-skills`](https://github.com/sickn33/agentic-awesome-skills) → `skills/analytics/SKILL.md`329330**Also appears in:** `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/analytics/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/analytics/SKILL.md`