New guide:Claude skills vs prompt templates for marketing work
Chartroom Search

Home/Analytics and reporting/Analytics Tracking

Analytics Tracking skill for Claude

Analytics Tracking decides which events your site should record and what to call them, then audits what GA4 actually recorded and recomputes any number you doubt

A 3-minute read with a 7-step sample run and a 23 KB download, updated

Download the skill

Works in claude.ai and Claude Code

How it works

Step 1 of 7

Step 1 of 7

It asks what decisions the data serves

Before naming a single event, Claude reads any product marketing file in your project and asks which decisions the numbers will inform, what is already tracked and which tools you use

Step 2 of 7

Events go into one table

Each event gets a row with its name, category, properties, trigger and notes, and conversions get their own table with how they are counted

Step 3 of 7

Lowercase object_action names

Names follow one pattern such as signup_completed, and where GA4 already has a recommended event like sign_up or purchase, Claude keeps the GA4 name and maps yours to it

Step 4 of 7

UTM values are checked for splits

GA4 counts LinkedIn and linkedin as two sources, so Claude groups values that differ only by case or spelling and checks for emails or names put into a UTM

Step 5 of 7

It finds traffic stuck in Unassigned

Mediums like newsletter, creator, podcast and community fall into Unassigned in GA4's default grouping, so Claude writes a custom channel group with a rule for each one

Step 6 of 7

Rates are recomputed from rows

A script computes totals and rates from row-level data and cross-checks them a second way, with spend and conversions covering the same closed weeks

Step 7 of 7

A tracking plan or audit findings

You get the tracking plan document or the audit findings, plus a recommendation argued from the goal you stated

In detail

A tracking plan built backwards from questions

The skill starts from what you need to know and what you will do with the answer, then works back to the events. It gives starter sets per site type: a marketing site gets cta_clicked, form_submitted, signup_completed and demo_requested, while an app gets onboarding_step_completed, feature_used, purchase_completed and subscription_cancelled.

A reference library adds longer event lists for marketing sites, apps, subscriptions and e-commerce. The finished plan lists events, custom dimensions and conversions in tables.

Naming rules that keep reports clean

Event names are lowercase with underscores and specific enough to read alone, so cta_hero_clicked beats button_clicked. Context such as button text or form location goes into properties. Properties never carry personal data, and they don't repeat what GA4 already collects on its own.

UTM patterns per partner type

UTMs are lowercase, use hyphens between words, and each source has one spelling only, kept in a shared sheet. For partners the skill fixes a pattern once: utm_medium names the kind of deal (newsletter, creator, podcast, partner referral, community) and utm_source names who sent the traffic.

A paid creator deal uses creator as the medium, because social mixes it with your organic posts and video mixes it with paid video ads. A newsletter that runs you on two dates gets two links.

Checking a number before anyone acts on it

When you ask whether a metric is right, Claude derives it from the rows and confirms it with a second, independent total, chasing any mismatch to the exact row. A cost per trial divides spend and trials from the same closed weeks, and the answer says which weeks those are. Signups still inside their trial window count as pending and stay out of the denominator.

Testing the tags once they are live

The skill writes gtag.js and dataLayer code for GTM; you or a developer add it to the site. Testing runs through GTM Preview and GA4 DebugView against a checklist: correct triggers, filled property values, no duplicate events, mobile and other browsers, conversions recorded, no personal data leaking. When GA4 conversions sit far from ad platform or store numbers, it checks key event counting, a missing tag on the thank-you page and consent mode gaps.

Rules it follows

Limits written into the skill, with the reason for each

  • Lowercase every UTM value and use one spelling per source

    GA4 treats LinkedIn and linkedin as two sources, and that split never merges back in the reports

  • Give newsletter, creator, podcast and community mediums their own rules in a custom channel group

    GA4's default grouping maps only partner referral and email to a channel, so the rest of partner traffic lands in Unassigned

  • Divide spend and conversions over the same closed observation window

    Full-month spend over two weeks of conversions gives a cost per conversion that is wrong from the start

  • Never put emails, names, phone numbers or user IDs in a UTM or an event property

    They end up in analytics reports and referrer logs, and Google's terms prohibit sending personal data to GA4

  • Treat the AI assistants channel as a floor

    Many visits from ChatGPT, Perplexity and similar assistants arrive as direct or through a branded search without any referrer

What it needs and what you get

What you provide

  • Your site or product type and the actions you care about
  • The analytics tools you use, such as GA4, GTM, Mixpanel or PostHog
  • Privacy or consent requirements
  • For an audit, a GA4 export or your current tracking plan

What you get back

A tracking plan document with tables for events, custom dimensions and conversions, or for an audit, a list of naming, UTM and channel problems with what to fix first

  • A tracking plan table with events, properties, triggers and conversions
  • Event naming rules and GA4 or dataLayer code examples
  • UTM conventions, including patterns per partner type
  • A validation checklist for GA4 DebugView and GTM Preview
  • A recomputed metric with the date window it covers

A piece of the output from the sample run

7 sources under 16 spellings (top 6 shown)

SourceSpellings in GA4All spellings
linkedinlinkedin, LinkedIn, li2,798 / 34 trials
freelancefridaysfreelancefridays, FreelanceFridays, freelance-fridays825 / 21 trials
youtubeyoutube, youtube.com1,071 / 21 trials

Do this first

  • Take emails out of invite links, request deletion of the 3 values in GA4
  • Rebuild links lowercase with hyphens, utm_medium creator, newsletter or podcast per partner

When to use it

  • You are launching a site or app and need to decide what to track
  • Your GA4 reports show split sources like LinkedIn and linkedin, or a lot of Unassigned traffic
  • A conversion rate or cost per signup looks wrong and you want it checked

Sample run

One test task, shown exactly as it ran

Read the run as text

GA4 traffic acquisition export for Nov 1-28 attached. Find UTM values that should be one source, fix our links, and tell me which partner deals to renew for Q1

  • ga4-traffic-acquisition-nov1-28.csv40 rows

Using the skill analytics

Reading 40 rows: 24,408 sessions and 437 trial_started, Nov 1-28 (channel sums match)
7 sources under 16 spellings (top 6 shown)
SourceSpellings in GA4All spellingsWrong spelling
linkedinlinkedin, LinkedIn, li2,798 / 34 trials1,064 / 16 trials
freelancefridaysfreelancefridays, FreelanceFridays, freelance-fridays825 / 21 trials303 / 7 trials
youtubeyoutube, youtube.com1,071 / 21 trials201 / 3 trials
redditreddit, Reddit405 / 5 trials172 / 3 trials
facebookfacebook, Facebook874 / 7 trials154 / 1 trial
tallyroutetallyroute, Tallyroute2,312 / 7 trials112 / 1 trial
Link and data checks1 passed, 2 need a look, 2 failed
  • failed: 3 invite links put an email address in utm_campaign
  • failed: Partner referral source is tagged partnerstack (245 sessions), should be bookkeepr
  • needs a look: 7 rows use uppercase, underscores or spaces (1,585 sessions)
  • needs a look: Creator links split across creator, social and video mediums
  • passed: linkedin.com / referral is untagged traffic, not a misspelling
Unassigned by medium: 2,461 sessions, 10.1% of all
  • creator75116 trials
  • newsletter72919 trials
  • community3897 trials
  • podcast3409 trials
  • (not set)2452 trials
  • partner7invite links

GA4's default channel group has no channel for these mediums. A custom group with rules for Newsletters, Creators, Podcasts, Community and AI assistants cuts Unassigned for the same 28 days from 2,461 sessions to 195.

Partner deals, all spellings combined
PartnerSessionsTrialsTrial rate
Freelance Fridays (newsletter)825212.55%
Bookkeepr (partner)333123.60%
Mira Builds (creator)552122.17%
Sam Kofi (creator)51991.73%
Solo Shop Podcast34092.65%
Indie Hackers (post)38971.80%

Do this first

  • Take emails out of invite links, request deletion of the 3 values in GA4
  • Rebuild links lowercase with hyphens, utm_medium creator, newsletter or podcast per partner
  • Add the custom channel group so partner traffic leaves Unassigned
  • Renew Freelance Fridays and Bookkeepr; podcast only with a promo code

Example prompts

Write a GA4 tracking plan for our B2B SaaS site: demo requests, trial signups and pricing page visits

Here is our GA4 traffic acquisition export. Find UTM values that should be one source and tell me how to fix the links

We spent $12,000 in November and got 140 trials, but trial data only covers the first two weeks. Is $86 per trial right?

How to install

In claude.ai

Download analytics-tracking.zip, upload the zip as it is under Settings, Capabilities, Skills and ask for the job in a new chat

Step by step: Use skills in Claude

In Claude Code

unzip analytics-tracking.zip -d ~/.claude/skills/

For one project only, move the analytics folder into .claude/skills/ inside it

Step by step: Claude Code skills docs

analytics-tracking.zipA 23 KB download with 7 files
  • analytics/
  • CHANGES.md3 KB
  • SKILL.md20 KB
  • evals/
  • evals.json9 KB
  • references/
  • event-library.md8 KB
  • ga4-implementation.md7 KB
  • gtm-implementation.md8 KB

Questions

Can it install the tracking on my site?

No, Analytics Tracking writes the plan and the gtag or dataLayer code for GTM, and you or a developer add it to the site and test it in GTM Preview and GA4 DebugView

Does it work if we use Mixpanel or PostHog instead of GA4?

Yes, the tracking plan and UTM conventions apply to any analytics tool, though the detailed setup guides are written for GA4 and Google Tag Manager