Home
cd ../playbooks
Marketing & ContentIntermediate

Analytics Tracking

Set up GA4, GTM, and event tracking that actually informs decisions — not vanity metrics.

10 minutes
By communitySource
#analytics#ga4#gtm#tracking

Most teams have analytics installed but no answers. Events fire inconsistently, naming conventions drift, and nobody trusts the numbers. A clean tracking plan turns analytics from a graveyard of dashboards into a tool that drives marketing decisions.

Who it's for: marketing operations, growth marketers, product managers, founders setting up GA4 and GTM, analytics implementers

Example

"Build a tracking plan for our SaaS marketing site" → Object-action event taxonomy, GA4 + GTM implementation guide, UTM strategy, validation checklist, and a tracking plan document ready to hand to engineering

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add analytics-tracking
---
name: analytics-tracking
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," "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.
metadata:
  version: 1.1.0
---

# 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

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

Helps you design and implement a tracking plan grounded in business decisions — choosing the right events, naming them consistently, configuring GA4 and GTM, validating the implementation, and setting up UTM conventions that survive contact with reality.


Quick Start

Step 1: Create a Project Folder

Create a dedicated folder for this workflow (e.g. ~/marketing/analytics-tracking).

Step 2: Download the Template

Click Download above and save the file as CLAUDE.md in that folder.

Step 3: Run the Workflow

Open the folder in Claude Code and describe what you need to measure. Claude will work backwards from the decisions to a clean event schema.


Inputs You'll Need

  • Business context — what decisions will this data inform; what are the key conversions
  • Current state — what tracking exists, what tools are in use
  • Tech stack — site/app platform, dev resources, privacy/compliance requirements
  • Tools — GA4, Mixpanel, Amplitude, PostHog, Segment

How It Works

  1. Start with the questions you need answered, then work backwards to events
  2. Apply object-action naming conventions (signup_completed, cta_clicked)
  3. Define essential events for marketing site and product/app, with standard properties
  4. Configure GA4 (property, data stream, enhanced measurement, custom events, conversions)
  5. Set up GTM container with tags, triggers, variables, and a clean data layer
  6. Define UTM conventions and document them in a single source of truth
  7. Validate with DebugView, GTM Preview Mode, and a tag-firing checklist

What You Get

  • Tracking plan document with event names, descriptions, properties, and triggers
  • GA4 implementation guide and gtag.js examples
  • GTM container structure with data layer pattern
  • UTM parameter strategy with naming rules
  • Debugging and validation checklist
  • Privacy and consent considerations (cookie consent, IP anonymization, consent mode)

Tips & Best Practices

  • Track for decisions, not data — every event should inform an action. Quality over quantity.
  • Be specific in event names — cta_hero_clicked beats generic button_clicked
  • Keep context in properties, not event names — easier to filter, easier to evolve
  • Avoid PII in analytics properties — bake privacy in from day one
  • Validate before publishing — DebugView and GTM Preview catch most issues in 5 minutes

$Related Playbooks

Marketing & Content

ASO Audit for App Store & Google Play Listings

Score an App Store or Google Play listing out of 100 across six weighted dimensions, find keyword gaps against competitors, and get character-counted rewrites for title, subtitle and keyword field.

10 minutes
Intermediate
Marketing & Content

Attribution Model

Set up attribution models.

15 minutes
Intermediate
Marketing & Content

Attribution Report

Run multi-touch attribution analysis.

15 minutes
Intermediate
Marketing & Content

Audience Intelligence

Research target audiences.

15 minutes
Intermediate
Marketing & Content

Audience Profile

Build detailed buyer personas.

15 minutes
Intermediate
Marketing & Content

Audience Swipe File Builder

Automatically scan your replies and comments to build a running swipe file of recurring questions, objections, and content ideas from your audience.

10 minutes
Intermediate
Marketing & Content

App Store Optimizer

Optimize Apple App Store and Google Play listings with keyword research, metadata tuning, and A/B testing strategies.

10 minutes
Intermediate
Marketing & Content

Co-Marketing

Identify ideal co-marketing partners and brainstorm high-impact joint campaigns.

10 minutes
Intermediate
Marketing & Content

Cold Email

Write B2B cold emails and follow-up sequences that get replies — without sounding like a sales machine.

5 minutes
Beginner
Marketing & Content

Community Marketing

Design, launch, and grow online communities that drive product growth and brand loyalty.

15 minutes
Intermediate
Marketing & Content

Churn Risk

Assess customer churn risk.

15 minutes
Intermediate
Marketing & Content

Competitive Ads Extractor

Analyze competitor advertisements from Facebook Ad Library and LinkedIn to identify successful messaging patterns and creative strategies.

10 minutes
Intermediate

Browse all Marketing & Content playbooks →