analytics-tracking

29
2
Source

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," or "tracking plan." For A/B test measurement, see ab-test-setup.

Install

mkdir -p .claude/skills/analytics-tracking && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1033" && unzip -o skill.zip -d .claude/skills/analytics-tracking && rm skill.zip

Installs to .claude/skills/analytics-tracking

About this skill

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.

Initial Assessment

Before implementing tracking, understand:

  1. Business Context

    • What decisions will this data inform?
    • What are the key conversion actions?
    • What questions need answering?
  2. Current State

    • What tracking exists?
    • What tools are in use (GA4, Mixpanel, Amplitude, etc.)?
    • What's working/not working?
  3. Technical Context

    • What's the tech stack?
    • Who will implement and maintain?
    • 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 | Event Category | Properties | Trigger | Notes
---------- | ------------- | ---------- | ------- | -----

Event Types

Pageviews

  • Automatic in most tools
  • Enhanced with page metadata

User Actions

  • Button clicks
  • Form submissions
  • Feature usage
  • Content interactions

System Events

  • Signup completed
  • Purchase completed
  • Subscription changed
  • Errors occurred

Custom Conversions

  • Goal completions
  • Funnel stages
  • Business-specific milestones

Event Naming Conventions

Format Options

Object-Action (Recommended)

signup_completed
button_clicked
form_submitted
article_read

Action-Object

click_button
submit_form
complete_signup

Category_Object_Action

checkout_payment_completed
blog_article_viewed
onboarding_step_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 to Track

Marketing Site

Navigation

  • page_view (enhanced)
  • outbound_link_clicked
  • scroll_depth (25%, 50%, 75%, 100%)

Engagement

  • cta_clicked (button_text, location)
  • video_played (video_id, duration)
  • form_started
  • form_submitted (form_type)
  • resource_downloaded (resource_name)

Conversion

  • signup_started
  • signup_completed
  • demo_requested
  • contact_submitted

Product/App

Onboarding

  • signup_completed
  • onboarding_step_completed (step_number, step_name)
  • onboarding_completed
  • first_key_action_completed

Core Usage

  • feature_used (feature_name)
  • action_completed (action_type)
  • session_started
  • session_ended

Monetization

  • trial_started
  • pricing_viewed
  • checkout_started
  • purchase_completed (plan, value)
  • subscription_cancelled

E-commerce

Browsing

  • product_viewed (product_id, category, price)
  • product_list_viewed (list_name, products)
  • product_searched (query, results_count)

Cart

  • product_added_to_cart
  • product_removed_from_cart
  • cart_viewed

Checkout

  • checkout_started
  • checkout_step_completed (step)
  • payment_info_entered
  • purchase_completed (order_id, value, products)

Event Properties (Parameters)

Standard Properties to Consider

Page/Screen

  • page_title
  • page_location (URL)
  • page_referrer
  • content_group

User

  • user_id (if logged in)
  • user_type (free, paid, admin)
  • account_id (B2B)
  • plan_type

Campaign

  • source
  • medium
  • campaign
  • content
  • term

Product (e-commerce)

  • product_id
  • product_name
  • category
  • price
  • quantity
  • currency

Timing

  • timestamp
  • session_duration
  • time_on_page

Best Practices

  • Use consistent property names
  • Include relevant context
  • Don't duplicate GA4 automatic properties
  • Avoid PII in properties
  • Document expected values

GA4 Implementation

Configuration

Data Streams

  • One stream per platform (web, iOS, Android)
  • Enable enhanced measurement

Enhanced Measurement Events

  • page_view (automatic)
  • scroll (90% depth)
  • outbound_click
  • site_search
  • video_engagement
  • file_download

Recommended Events

Custom Events (GA4)

// gtag.js
gtag('event', 'signup_completed', {
  'method': 'email',
  'plan': 'free'
});

// Google Tag Manager (dataLayer)
dataLayer.push({
  'event': 'signup_completed',
  'method': 'email',
  'plan': 'free'
});

Conversions Setup

  1. Collect event in GA4
  2. Mark as conversion in Admin > Events
  3. Set conversion counting (once per session or every time)
  4. Import to Google Ads if needed

Custom Dimensions and Metrics

When to use:

  • Properties you want to segment by
  • Metrics you want to aggregate
  • Beyond standard parameters

Setup:

  1. Create in Admin > Custom definitions
  2. Scope: Event, User, or Item
  3. Parameter name must match

Google Tag Manager Implementation

Container Structure

Tags

  • GA4 Configuration (base)
  • GA4 Event tags (one per event or grouped)
  • Conversion pixels (Facebook, LinkedIn, etc.)

Triggers

  • Page View (DOM Ready, Window Loaded)
  • Click - All Elements / Just Links
  • Form Submission
  • Custom Events

Variables

  • Built-in: Click Text, Click URL, Page Path, etc.
  • Data Layer variables
  • JavaScript variables
  • Lookup tables

Best Practices

  • Use folders to organize
  • Consistent naming (Tag_Type_Description)
  • Version notes on every publish
  • Preview mode for testing
  • Workspaces for team collaboration

Data Layer Pattern

// Push custom event
dataLayer.push({
  'event': 'form_submitted',
  'form_name': 'contact',
  'form_location': 'footer'
});

// Set user properties
dataLayer.push({
  'user_id': '12345',
  'user_type': 'premium'
});

// E-commerce event
dataLayer.push({
  'event': 'purchase',
  'ecommerce': {
    'transaction_id': 'T12345',
    'value': 99.99,
    'currency': 'USD',
    'items': [{
      'item_id': 'SKU123',
      'item_name': 'Product Name',
      'price': 99.99
    }]
  }
});

UTM Parameter Strategy

Standard Parameters

ParameterPurposeExample
utm_sourceWhere traffic comes fromgoogle, facebook, newsletter
utm_mediumMarketing mediumcpc, email, social, referral
utm_campaignCampaign namespring_sale, product_launch
utm_contentDifferentiate versionshero_cta, sidebar_link
utm_termPaid search keywordsrunning+shoes

Naming Conventions

Lowercase everything

  • google, not Google
  • email, not Email

Use underscores or hyphens consistently

  • product_launch or product-launch
  • Pick one, stick with it

Be specific but concise

  • blog_footer_cta, not cta1
  • 2024_q1_promo, not promo

UTM Documentation

Track all UTMs in a spreadsheet or tool:

CampaignSourceMediumContentFull URLOwnerDate
.....................

UTM Builder

Provide a consistent UTM builder link to team:

  • Google's URL builder
  • Internal tool
  • Spreadsheet formula

Debugging and Validation

Testing Tools

GA4 DebugView

  • Real-time event monitoring
  • Enable with ?debug_mode=true
  • Or via Chrome extension

GTM Preview Mode

  • Test triggers and tags
  • See data layer state
  • Validate before publish

Browser Extensions

  • GA Debugger
  • Tag Assistant
  • dataLayer Inspector

Validation Checklist

  • Events firing on correct triggers
  • Property values populating correctly
  • No duplicate events
  • Works across browsers
  • Works on mobile
  • Conversions recorded correctly
  • User ID passing when logged in
  • No PII leaking

Common Issues

Events not firing

  • Trigger misconfigured
  • Tag paused
  • GTM not loaded on page

Wrong values

  • Variable not configured
  • Data layer not pushing correctly
  • Timing issues (fire before data ready)

Duplicate events

  • Multiple GTM containers
  • Multiple tag instances
  • Trigger firing multiple times

Privacy and Compliance

Considerations

  • Cookie consent required in EU/UK/CA
  • No PII in analytics properties
  • Data retention settings
  • User deletion capabilities
  • Cross-device tracking consent

Implementation

Consent Mode (GA4)

  • Wait for consent before tracking
  • Use consent mode for partial tracking
  • Integrate with consent management platform

Data Minimization

  • Only collect what you need
  • IP anonymization
  • No PII in custom dimensions

Output Format

Tracking Plan Document

# [Site/Product] Tracking Plan

## Overview
- Tools: GA4, GTM
- Last updated: [Date]
- Owner: [Name]

## Events

### Marketing Events

| Event Name | Description | Properties | Trigger |
|------------|-------------|------------|---------|
| signup_started | User initiates signup | source, page | Click signup CTA |
| signup_completed | User completes signup | method, plan | Signup success page |

### Product Events
[Similar table]

## Custom Dimensions

| Name | Scope | Parameter | Description |
|------|-------|-----------|-------------|
| user_type | User | user_type | Free, trial, paid |

## Conversions

| Conversion | Event | Counting | Google Ads |
|------------|-------|----------|------------|
| Signup | signup_completed | Once per session | Yes |

## UTM Convention

[Guidelines]

Implementation Code

Provide ready-to-use code snippets

Testing Checklist

Specific validation steps


Questions to Ask

If you need more context:

  1. What

Content truncated.

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

469162

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

12580

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

7966

humanizer

davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. Credits: Original skill by @blader - https://github.com/blader/humanizer

10250

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

14549

2d-games

davila7

2D game development principles. Sprites, tilemaps, physics, camera.

12744

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

1,5641,368

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

1,1061,184

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,4141,106

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,192746

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

1,147683

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,304608

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.