PAID ADS SKILL
analytics
Set up or audit measurement: a tracking-plan framework, object-action event naming, GA4 and Tag Manager implementation, UTM conventions, and a debugging checklist.
by Corey Hainescoreyhaines31/marketingskillsMIT licencev2.0.1upstream 2026-09-05read by us 11 September 2026
The skill is the upstream of everything else on this shelf. Attribution assumes tracking exists; A/B testing assumes conversions are recorded; paid media assumes a pixel fires. This one writes the plan those depend on.
Its principles are the ones that survive contact with a real GTM container: track for decisions not data, start from the questions, name things consistently (lowercase, underscores, object_action), keep context in properties not event names, no PII in properties.
It is short, 1,222 words, with the event library, GA4 and GTM details in three reference files. The output is a tracking plan document with events, custom dimensions and conversions in tables.
When to use it
The phrases that trigger it
From the skill’s own description: say any of these and an agent that has it installed will load it.
- set up tracking
- GA4
- conversion tracking
- event tracking
- UTM parameters
- tag manager
- tracking plan
- are my events firing
- analytics isn’t working
What’s inside
The playbook, section by section
Tracking plan framework
Event name, category, properties, trigger, notes; four event types from pageviews to custom conversions.
Essential events by surface
Marketing site (cta_clicked, form_submitted, signup_completed, demo_requested) and product (onboarding_step_completed, feature_used, purchase_completed, subscription_cancelled).
GA4 in five steps and GTM in three parts
Property, gtag or GTM, enhanced measurement, custom events, conversions; tags, triggers, variables with the dataLayer pattern.
UTM strategy
Five parameters, lowercase, one separator, specific values, documented in a spreadsheet.
Debugging and validation
DebugView, Preview mode, Tag Assistant; a six-item checklist; the three common issues and where to look.
Privacy
Consent mode, IP anonymisation, data retention, deletion capability, a consent management platform for EU, UK and California.
Reference files: event-library.md ga4-implementation.md gtm-implementation.md
See it in action
One real run, cropped
We installed the skill folder, gave it the request below, and kept what it returned. Nothing was edited; the excerpt is the first 660 of 25,175 characters. The full output is in our repository as research/skills/runs/analytics.md.
Write the GA4 tracking plan for addition-labs.com, a B2B agency site. Conversions we care about: the contact form on /contact, the 'ask for an audit' modal, a Calendly booking, and use of the 16 calculators under /tools (a calculation completed, a result copied). Give the events, properties, conversions and the GTM approach.
addition-labs.com Tracking Plan
Overview
- Tools: GA4 (web data stream) + Google Tag Manager (web container)
- Site type: B2B agency, multi-page static site (Vite build), no login, no ecommerce
- Last updated: 2026-09-11
- Decisions this data must inform: which pages and CTAs produce leads (contact form, audit request, booked call), whether the 16 tools under
/toolscreate leads or only traffic, and which acquisition channels are worth more budget.
What the live site already has (measured on 2026-09-11, not assumed)
I fetched /, /contact, /tools, /tools/roas-calculator and the four JS chunks they ship. Findings that shape the plan:
Cropped here. The rest continues in the same register.
What it could not do in this run
who implements (dev vs marketing), whether Google Ads / LinkedIn / Clarity are in play, any lead value, and whether Calendly is actually planned (the live site ships a first-party booker at /api/slots + /api/book, not Calendly). These are listed as open questions at the end of OUTPUT.md instead of being answered by assumption; the plan itself was still delivered because the request already answered questions 1 to 3 of the skill's Task-Specific Questions.
Method behind it
Where we would differ, and why
Our cost-per-lead glossary shows what the numbers this plan produces are for: a lead count that means the same thing in the ad platform and the form handler. The skill sets up the events; the glossary shows the ratio they feed.
- Note 1
- The GA4 section still says "mark conversions in Admin" and the GTM reference describes a "GA4 Configuration" tag. GA4 renamed conversions to key events and the GTM tag is now the Google Tag; the consent snippet also omits the Consent Mode v2 signals (ad_user_data, ad_personalization). The plan structure survives; the button names have moved.
- Note 2
- The GA4 quick setup says "enable enhanced measurement". On a store, enhanced measurement double-fires scroll and outbound events alongside a theme’s own tracking; we switch the overlapping toggles off and say why in the plan.
- Note 3
- Consent is a section at the end. For an EU-facing site it is the first decision, because the loader that respects consent decides what the plan can even record.
SKILL.md
The upstream file, as we read it
Copyright Corey Haines, MIT licence, commit 5b2c000 of coreyhaines31/marketingskills. Reproduced here under that licence so you can read what the agent will read; the folder’s reference files are in the repository.
Open SKILL.md (1,223 words)
---
name: analytics
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," "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 choosing attribution models, comparing multi-touch/MMM/incrementality, or reconciling conflicting numbers across tools, see attribution. For A/B test measurement, see ab-testing.
metadata:
version: 2.0.1
---
# 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.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:
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
| 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](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](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
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
```javascript
gtag('event', 'signup_completed', {
'method': 'email',
'plan': 'free'
});
```
**For detailed GA4 implementation**: See [references/ga4-implementation.md](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
```javascript
dataLayer.push({
'event': 'form_submitted',
'form_name': 'contact',
'form_location': 'footer'
});
```
**For detailed GTM implementation**: See [references/gtm-implementation.md](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
- [ ] 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
| 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
```markdown
# [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](../../tools/REGISTRY.md). Key analytics tools:
| Tool | Best For | MCP | Guide |
|------|----------|:---:|-------|
| **GA4** | Web analytics, Google ecosystem | ✓ | [ga4.md](../../tools/integrations/ga4.md) |
| **Mixpanel** | Product analytics, event tracking | - | [mixpanel.md](../../tools/integrations/mixpanel.md) |
| **Amplitude** | Product analytics, cohort analysis | - | [amplitude.md](../../tools/integrations/amplitude.md) |
| **PostHog** | Open-source analytics, session replay | - | [posthog.md](../../tools/integrations/posthog.md) |
| **Segment** | Customer data platform, routing | - | [segment.md](../../tools/integrations/segment.md) |
---
## Related Skills
- **ab-testing**: For experiment tracking
- **attribution**: For attribution models, multi-touch/MMM/incrementality, and reconciling conflicting numbers across tools (once tracking is live)
- **seo-audit**: For organic traffic analysis
- **cro**: For conversion optimization (uses this data)
- **revops**: For pipeline metrics, CRM tracking, and revenue attribution
Questions
Questions people ask before installing
Does it configure GA4 for me?
No. It writes the plan and the snippets. Configuring the property, GTM container and conversions is done by you or a developer; the GA4 MCP on the toolkit shelf can read the result back.
Is it GA4 only?
GA4 and GTM are the worked path; Mixpanel, Amplitude, PostHog and Segment are named as alternatives with the same event structure.
What about Shopify’s own analytics?
Not covered. Shopify’s pixel and the ad platforms’ pixels are a separate layer; this skill plans the web analytics events, and the attribution skill reconciles them with the order system.