Best for
- Use when building a tracking plan from scratch, auditing existing analytics for gaps or errors, debugging missing events, or setting up GTM.
alirezarezvani/claude-skills/marketing-skill/skills/analytics-tracking/SKILL.md
Set up, audit, and debug analytics tracking implementation — GA4, Google Tag Manager, event taxonomy, conversion tracking, and data quality. Use when building a tracking plan from scratch, auditing existing analytics for gaps or errors, debugging missing events, or setting up GTM. Trigger keywords: GA4 setup, Google Tag Manager, GTM, event tracking, analytics implementation, conversion tracking, tracking plan, event taxonomy, custom dimensions, UTM tracking, analytics audit, missing events, trac
Decision brief
You are an expert in analytics implementation. Your goal is to make sure every meaningful action in the customer journey is captured accurately, consistently, and in a way that can actually be used for decisions — not just for the sake of having data.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/alirezarezvani/claude-skills --skill "marketing-skill/skills/analytics-tracking"Inspect the Agent Skill "analytics-tracking" from https://github.com/alirezarezvani/claude-skills/blob/f2bac0a8f29b71846cc62d9d580249c2a3246030/marketing-skill/skills/analytics-tracking/SKILL.md at commit f2bac0a8f29b71846cc62d9d580249c2a3246030. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Create property in GA4 → Admin → Properties → Create 2. Add web data stream with your domain 3. Enhanced Measurement — enable all, then review: - ✅ Page views (keep) - ✅ Scrolls (keep) - ✅ Outbound clicks (keep) - ✅ Site search (keep if you have search) - ⚠️ Video engagement…
Pattern 1: Data Layer Push (most reliable)
Check for context first: If .claude/product-marketing-context.md exists, read it before asking questions. Use that context and only ask for what's missing.
Do you have GA4 and/or GTM already set up? If so, what's broken or missing?
What are your primary conversion actions? (signup, purchase, lead form, free trial start)
Permission review
The documentation asks the agent to run terminal commands or scripts.
python3 scripts/tracking_plan_generator.py # embedded sample → full tracking planThe documentation asks the agent to run terminal commands or scripts.
python3 scripts/tracking_plan_generator.py plan.json # your funnel definitionEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 24,975 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
You are an expert in analytics implementation. Your goal is to make sure every meaningful action in the customer journey is captured accurately, consistently, and in a way that can actually be used for decisions — not just for the sake of having data.
Bad tracking is worse than no tracking. Duplicate events, missing parameters, unconsented data, and broken conversions lead to decisions made on bad data. This skill is about building it right the first time, or finding what's broken and fixing it.
Check for context first:
If .claude/product-marketing-context.md exists, read it before asking questions. Use that context and only ask for what's missing.
Gather this context:
No analytics in place — we'll build the tracking plan, implement GA4 and GTM, define the event taxonomy, and configure key events.
Start from the generator, then customize:
python3 scripts/tracking_plan_generator.py # embedded sample → full tracking plan
python3 scripts/tracking_plan_generator.py plan.json # your funnel definition
python3 scripts/tracking_plan_generator.py --json # parseable JSON for pipelines
Its output (event taxonomy + parameters + GA4/GTM config checklist) is the working draft for the Event Taxonomy Design section below — review every generated event name against the naming convention before implementing.
Tracking exists but you don't trust the data, coverage is incomplete, or you're adding new goals. We'll audit what's there, gap-fill, and clean up.
Specific events are missing, conversion numbers don't add up, or GTM preview shows events firing but GA4 isn't recording them. Structured debugging workflow.
Get this right before touching GA4 or GTM. Retrofitting taxonomy is painful.
Format: object_action (snake_case, verb at the end)
| ✅ Good | ❌ Bad |
|---|---|
form_submit | submitForm, FormSubmitted, form-submit |
plan_selected | clickPricingPlan, selected_plan, PlanClick |
video_started | videoPlay, StartVideo, VideoStart |
checkout_completed | purchase, buy_complete, checkoutDone |
Rules:
noun_verb not verb_noun_started, _completed, _failed (not mix of past/present)Every event should include these where applicable:
| Parameter | Type | Example | Purpose |
|---|---|---|---|
page_location | string | https://app.co/pricing | Auto-captured by GA4 |
page_title | string | Pricing - Acme | Auto-captured by GA4 |
user_id | string | usr_abc123 | Link to your CRM/DB |
plan_name | string | Professional | Segment by plan |
value | number | 99 | Revenue/order value |
currency | string | USD | Required with value |
content_group | string | onboarding | Group pages/flows |
method | string | google_oauth | How (signup method, etc.) |
Core funnel events:
visitor_arrived (page view — automatic in GA4)
signup_started (user clicked "Sign up")
signup_completed (account created successfully)
trial_started (free trial began)
onboarding_step_completed (param: step_name, step_number)
feature_activated (param: feature_name)
plan_selected (param: plan_name, billing_period)
checkout_started (param: value, currency, plan_name)
checkout_completed (param: value, currency, transaction_id)
subscription_cancelled (param: cancel_reason, plan_name)
Micro-conversion events:
pricing_viewed
demo_requested (param: source)
form_submitted (param: form_name, form_location)
content_downloaded (param: content_name, content_type)
video_started (param: video_title)
video_completed (param: video_title, percent_watched)
chat_opened
help_article_viewed (param: article_name)
See references/event-taxonomy-guide.md for the full taxonomy catalog with custom dimension recommendations.
For any event not auto-collected, create it in GTM (preferred) or via gtag directly:
Via gtag:
gtag('event', 'signup_completed', {
method: 'email',
user_id: 'usr_abc123',
plan_name: "trial"
});
Via GTM data layer (preferred — see GTM section):
window.dataLayer.push({
event: 'signup_completed',
signup_method: 'email',
user_id: 'usr_abc123'
});
Mark these events as key events in GA4 → Admin → Key events (GA4 renamed "Conversions" to "Key events" in March 2024 — "conversions" now refers only to Google Ads conversion actions):
signup_completedcheckout_completeddemo_requestedtrial_started (if separate from signup)Rules:
GTM Container
├── Tags
│ ├── GA4 Configuration (fires on all pages)
│ ├── GA4 Event — [event_name] (one tag per event)
│ ├── Google Ads Conversion (per conversion action)
│ └── Meta Pixel (if running Meta ads)
├── Triggers
│ ├── All Pages
│ ├── DOM Ready
│ ├── Data Layer Event — [event_name]
│ └── Custom Element Click — [selector]
└── Variables
├── Data Layer Variables (dlv — for each dL key)
├── Constant — GA4 Measurement ID
└── JavaScript Variables (computed values)
Pattern 1: Data Layer Push (most reliable)
Your app pushes to dataLayer → GTM picks it up → sends to GA4.
// In your app code (on event):
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'signup_completed',
signup_method: 'email',
user_id: userId,
plan_name: "trial"
});
GTM Tag: GA4 Event
Event Name: {{DLV - event}} OR hardcode "signup_completed"
Parameters:
signup_method: {{DLV - signup_method}}
user_id: {{DLV - user_id}}
plan_name: "dlv-plan-name"
Trigger: Custom Event - "signup_completed"
Pattern 2: CSS Selector Click
For events triggered by UI elements without app-level hooks.
GTM Trigger:
Type: Click - All Elements
Conditions: Click Element matches CSS selector [data-track="demo-cta"]
GTM Tag: GA4 Event
Event Name: demo_requested
Parameters:
page_location: {{Page URL}}
See references/gtm-patterns.md for full configuration templates.
PageView, Lead, CompleteRegistration, PurchaseEnforce strict UTM conventions or your channel data becomes noise.
| Parameter | Convention | Example |
|---|---|---|
utm_source | Platform name (lowercase) | google, linkedin, newsletter |
utm_medium | Traffic type | cpc, email, social, organic |
utm_campaign | Campaign ID or name | q1-trial-push, brand-awareness |
utm_content | Ad/creative variant | hero-cta-blue, text-link |
utm_term | Paid keyword | saas-analytics |
Rule: Never tag organic or direct traffic with UTMs. UTMs override GA4's automatic source/medium attribution.
| Platform | Default Window | Recommended for SaaS |
|---|---|---|
| GA4 | 30 days | 30-90 days depending on sales cycle |
| Google Ads | 30 days | 30 days (trial), 90 days (enterprise) |
| Meta | 7-day click, 1-day view | 7-day click only |
| 30 days | 30 days |
For funnels that cross domains (e.g., acme.com → app.acme.com):
Events firing twice? Common causes:
Fix: Audit GTM Preview for double-fires. Check Network tab in DevTools for duplicate hits.
GA4 filters known bots automatically. For internal traffic:
Under GDPR/ePrivacy, analytics may require consent. Plan for this:
| Consent Mode setting | Impact |
|---|---|
| No consent mode | Visitors who decline cookies → zero data |
| Basic consent mode | Visitors who decline → zero data |
| Advanced consent mode | Visitors who decline → modeled data (GA4 estimates using consented users) |
Recommendation: Implement Advanced Consent Mode via GTM. Requires CMP integration (Cookiebot, OneTrust, Usercentrics, etc.).
Expected consent rate by region: 60-75% EU, 85-95% US.
Surface these without being asked:
| When you ask for... | You get... |
|---|---|
| "Build a tracking plan" | Event taxonomy table (events + parameters + triggers), GA4 configuration checklist, GTM container structure |
| "Audit my tracking" | Gap analysis vs. standard SaaS funnel, data quality scorecard (0-100), prioritized fix list |
| "Set up GTM" | Tag/trigger/variable configuration for each event, container setup checklist |
| "Debug missing events" | Structured debugging steps using GTM Preview + GA4 DebugView + Network tab |
| "Set up conversion tracking" | Conversion action configuration for GA4 + Google Ads + Meta |
| "Generate tracking plan" | Run python3 scripts/tracking_plan_generator.py [plan.json] [--json] — event taxonomy + GA4/GTM checklist |
All output follows the structured communication standard:
Frequently asked questions
You are an expert in analytics implementation. Your goal is to make sure every meaningful action in the customer journey is captured accurately, consistently, and in a way that can actually be used for decisions — not just for the sake of having data.
The source record exposes this install command: npx skills add https://github.com/alirezarezvani/claude-skills --skill "marketing-skill/skills/analytics-tracking". Inspect the command and pinned source before running it.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
narrative-io/narrative-skills-marketplace
Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "
JasonColapietro/suede-creator-skills
Suede-owned measurement discipline for tracking plans, event and conversion instrumentation, UTM and campaign-parameter hygiene, and verification of what actually fires. Use when setting up, auditing, or repairing analytics across web, product, paid, and lifecycle surfaces. NOT FOR: experiment design or significance decisions (use suede-ab-testing), campaign optimization (use suede-ads), attribution models, model comparison, or cross-tool reconciliation (use suede-attribution), or revenue-proces
kensaurus/cursor-kenji
Cross-page UX audit for user stories, task completion, and information architecture — the layer audit-ux (per-page heuristics) skips. Use when "audit user flows", "IA audit", "can users find X", "navigation audit", or "funnel drop-off". Full DS burndown → plan-uiux-unification.
alirezarezvani/claude-skills
When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.