Skip to main content

This skill may not reflect the latest upstream change

Google Search Central Blog update on 2026-11-16 may affect this skill Last checked Nov 25, 2026.

MarketingAI reviewed Jul 21, 2026

analytics-tracking

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 plan," "how do I measure this," "track conversions," "attribution," "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 A/B test measurement, see ab-test-setup.

v1.0.0New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install marketing-skills-analytics-tracking
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/marketing-skills-analytics-tracking/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

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

Check for product marketing context first:
If .agents/product-marketing-context.md exists (or .claude/product-marketing-context.md 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:

  1. Business Context - What decisions will this data inform? What are key conversions?
  2. Current State - What tracking exists? What tools are in use?
  3. 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

TypeExamples
PageviewsAutomatic, enhanced with metadata
User ActionsButton clicks, form submissions, feature usage
System EventsSignup completed, purchase, subscription changed
Custom ConversionsGoal 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

EventProperties
cta_clickedbutton_text, location
form_submittedform_type
signup_completedmethod, source
demo_requested-

Product/App

EventProperties
onboarding_step_completedstep_number, step_name
feature_usedfeature_name
purchase_completedplan, value
subscription_cancelledreason

For full event library by business type: See references/event-library.md


Event Properties

Standard Properties

CategoryProperties
Pagepage_title, page_location, page_referrer
Useruser_id, user_type, account_id, plan_type
Campaignsource, medium, campaign, content, term
Productproduct_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

  1. Create GA4 property and data stream
  2. Install gtag.js or GTM
  3. Enable enhanced measurement
  4. Configure custom events
  5. 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

ComponentPurpose
TagsCode that executes (GA4, pixels)
TriggersWhen tags fire (page view, click)
VariablesDynamic 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

ParameterPurposeExample
utm_sourceTraffic sourcegoogle, newsletter
utm_mediumMarketing mediumcpc, email, social
utm_campaignCampaign namespring_sale
utm_contentDifferentiate versionshero_cta
utm_termPaid search keywordsrunning+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

ToolUse For
GA4 DebugViewReal-time event monitoring
GTM Preview ModeTest triggers before publish
Browser ExtensionsTag 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

IssueCheck
Events not firingTrigger config, GTM loaded
Wrong valuesVariable path, data layer structure
Duplicate eventsMultiple 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

  1. What tools are you using (GA4, Mixpanel, etc.)?
  2. What key actions do you want to track?
  3. What decisions will this data inform?
  4. Who implements - dev team or marketing?
  5. Are there privacy/consent requirements?
  6. What's already tracked?

Tool Integrations

For implementation, see the tools registry. Key analytics tools:

ToolBest ForMCPGuide
GA4Web analytics, Google ecosystem✓ga4.md
MixpanelProduct analytics, event tracking-mixpanel.md
AmplitudeProduct analytics, cohort analysis-amplitude.md
PostHogOpen-source analytics, session replay-posthog.md
SegmentCustomer data platform, routing-segment.md

Related Skills

  • ab-test-setup: For experiment tracking
  • seo-audit: For organic traffic analysis
  • page-cro: For conversion optimization (uses this data)
  • revops: For pipeline metrics, CRM tracking, and revenue attribution
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
marketing-psychologyWhen the user wants to apply psychology to marketing, or asks why buyers behave or value things as they do, or whether a persuasion tactic is honest: biases, mental models, anchoring, social proof, scarcity, loss aversion, framing. For a page, see cro. For pricing tactics, see pricing. For copy, see copywriting.2 installsmarketing-councilWhen the user wants several expert takes on a marketing decision, or asks what a famous marketer would say about it: a simulated board (Seth Godin, David Ogilvy, April Dunford, Byron Sharp, and more), each grounded in their documented frameworks, where they disagree, and a recommendation. To execute, hand off to the relevant skill.2 installsemail-sequenceWhen the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding-cro.2 installsvideoWhen the user wants to create video with AI tools or code, or asks which approach to use (screen recording, AI avatar, generated, or templated) or how to make videos repeatably: product demos, AI generation (Veo, Sora, HeyGen), programmatic video with Remotion. For what to post, see social. For video ads, see ad-creative.2 installsmarketing-ideasWhen the user wants marketing ideas or growth tactics for a software product, or asks what to try to get attention or the next customers with little time or budget, or after the obvious channels. Draws on a library of 139 ideas. For a specific channel, see that skill (ads, social, emails, and others). For a full plan, see marketing-plan.2 installslead-magnetsWhen the user wants to plan or improve a lead magnet, or asks what to give away for emails or how much to ask in return (gating, form fields): checklists, templates, ebooks, gated guides, content upgrades. For interactive tools, see free-tools. For the follow-up sequence, see emails. For popups that capture emails, see popups.1 installs

More from Marketing Skills

View source →
imageWhen the user wants to create, generate, edit, or optimize marketing images, or asks which approach to take (generate, design, or photograph): blog heroes, social graphics, product mockups, banners, OG images. For ad images, see ad-creative. For video, see video.14 installssales-enablementWhen the user wants sales collateral, or asks what to give a champion or rep, or how to answer an objection or make the case: decks, one-pagers, objection handling, demo scripts, talk tracks, battle cards, proposals, win-loss. For public comparison pages, see competitors. For buyer research, see customer-research. For website copy, see copywriting. For cold emails, see cold-email. For the offer, see offers.8 installscopywritingWhen the user wants to write or rewrite page copy (homepage, landing, pricing, feature), or asks which headline, promise, or message to lead with. Diagnoses the input first (blank brief, real voice, or point edit) and changes only what it calls for. Claims must be supportable; a declined claim names the evidence that would unlock it. No AI tells like 'it's not X, it's Y' or 'no X, no Y, no Z'. For editing, see copy-editing. For emails, see emails. For the offer, see offers.7 installspaywall-upgrade-croWhen the user wants to create or optimize in-app paywalls, upgrade screens, upsell modals, or feature gates. Also use when the user mentions "paywall," "upgrade screen," "upgrade modal," "upsell," "feature gate," "convert free to paid," "freemium conversion," "trial expiration screen," "limit reached screen," "plan upgrade prompt," "in-app pricing," "free users won't upgrade," "trial to paid conversion," or "how do I get users to pay." Use this for any in-product moment where you're asking users to upgrade. Distinct from public pricing pages (see page-cro) — this focuses on in-product upgrade moments where the user has already experienced value. For pricing decisions, see pricing-strategy.4 installssocialWhen the user wants organic social content for LinkedIn, X, Instagram, TikTok, or Facebook, or asks what to post, which format to favor, or from which account: posts, threads, carousels, short-form video scripts, calendars, build-in-public posts from commits, listening. No AI tells like 'it's not X, it's Y' or broetry. For content strategy, see content-strategy. For paid ads, see ad-creative. For press, see public-relations.4 installsproduct-marketing-contextWhen the user wants to create or update their product marketing context document. Also use when the user mentions 'product context,' 'marketing context,' 'set up context,' 'positioning,' 'who is my target audience,' 'describe my product,' 'ICP,' 'ideal customer profile,' or wants to avoid repeating foundational information across marketing tasks. Use this at the start of any new project before using other marketing skills — it creates `.agents/product-marketing-context.md` that all other skills reference for product, audience, and positioning context.2 installs

More Marketing skills

Browse category →
social-media-managerPlan social media: strategy, content calendar, community management, follower growth. Use whenever the user asks what to post and when, or how to grow followers. Single posts: social-content.136 installsmarketing-strategy-pmmUse for product positioning, ICP, competitive battlecards or a go-to-market plan, before drafting. Applies April Dunford's positioning method and produces the positioning statement, battlecards and launch plan.72 installsseo-auditFind why a site is not ranking: technical SEO, on-page issues, meta tags, site health. Use whenever the user asks why a page is not on Google, why traffic dropped or for an SEO audit.31 installspage-metadataWhen the user wants a full-page metadata audit or implementation across discovery, search intent, title, description, canonical, robots, hreflang, Open Graph, Twitter Cards, code or CMS changes, build validation, rendered HTML, production verification, localization, or post-release observation. Also use for "metadata audit," "sitewide meta optimization," "metadata implementation," "meta robots," "hreflang," "viewport," or "charset." For an isolated title, description, heading, Open Graph, or Twitter Card task, use its specialist skill directly.19 installsseo-schemaDetect, validate, or generate Schema.org JSON-LD for a supplied page or entity. Use only when structured data or rich-result markup is requested.16 installscontent-marketingWhen the user wants to plan content marketing across channels, define content types and formats, or create a content repurposing strategy. Also use when the user mentions "content marketing strategy," "content types," "content formats," "content repurposing," "content calendar," "content mix," "owned content," "content distribution," "content funnel," or "content planning across channels." For SEO calendar, use content-strategy.16 installs

Frequently asked questions about analytics-tracking

What does the analytics-tracking skill do?

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 plan," "how do I measure this," "track conversions," "attribution," "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 A/B test measurement, see ab-test-setup. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the analytics-tracking skill?

Run `npx @skills-hub-ai/cli install marketing-skills-analytics-tracking` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/marketing-skills-analytics-tracking/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does analytics-tracking work with?

analytics-tracking runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the analytics-tracking skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use analytics-tracking after installing it?

In Claude Code, type `/marketing-skills-analytics-tracking` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the analytics-tracking skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.