Skip to main content
skill CX Codex

analytics-tracking-automation — Claude Code skill: GA4 and GTM

A skill that walks the agent through analytics setup: crawl the site, design GA4 events, sync them into GTM, verify in preview, publish the container.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/data-skills --skill analytics-tracking-automation -a claude-code
Open on GitHub

What analytics-tracking-automation does

The skill hands the agent a six-stage workflow. It crawls the site and sorts pages by purpose — product, pricing, contact. From that it builds a GA4 event schema with parameters and triggers, pushes it into a Google Tag Manager container over the API, runs Playwright checks against preview mode, and publishes the container version once those checks pass.

The event-tracking CLI drives all of it, with init, resume, audit, sync, verify and publish. Every run writes an artifact folder: site-analysis.json, page-groups.json, event-schema.json, verification-report.json, checkpoint.json. You can edit those files and pick up from the last checkpoint instead of starting over. Shopify storefronts get their own mode covering cart, checkout and purchase events.

Syncing to GTM needs Google OAuth credentials — GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET — and the redirect URI has to be http://localhost:3000/oauth/callback. Skip that and sync stops there. Node.js 18+ is required, and Playwright Chromium installs on the first npm install.

What it helps with

  • plan GA4 events around how a specific site is built
  • compare a live GTM container against a recommended tracking plan
  • create GTM tags, triggers and variables without clicking through the UI
  • check that events fire in preview before anything goes live
  • set up cart and purchase events for a Shopify store

Example prompts for the agent

  • Analyze https://www.example.com and draft a GTM tracking plan for it
  • Generate a GA4 event schema and sync it to my GTM container
  • Audit my GTM container and show where it drifts from the plan

How to install analytics-tracking-automation

1Skills CLI (Vercel)

npx skills add reason-machines/data-skills --skill analytics-tracking-automation -a claude-code

2Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/analytics-tracking-automation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about analytics-tracking-automation

How do I install analytics-tracking-automation in Claude Code?

Run npx skills add reason-machines/data-skills --skill analytics-tracking-automation -a claude-code, then confirm the skill file sits at ~/.claude/skills/analytics-tracking-automation/SKILL.md.

What does analytics-tracking-automation do?

It crawls a site, groups pages by intent, designs a GA4 event schema, writes it into a GTM container, verifies event firing in preview, and publishes the container version.

What do I need before syncing with Google Tag Manager?

Google OAuth credentials: GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from Google Cloud Console, with the Tag Manager API enabled and redirect URI http://localhost:3000/oauth/callback. The first sync opens a browser for consent.

Similar skills

Everything for Marketing and content →

From the same set31

harvard-artifacts-data-engineering-pipeline Pulls artifact records from the Harvard Art Museums API, loads them into SQL tables, and renders a Streamlit dashboard on top. CX Codex +1 2,000installs harvard-artifacts-etl-analytics A skill that walks your agent through building an ETL pipeline and an analytics dashboard on Harvard Art Museums API data. Useful when you want a set route from API calls to Streamlit charts. CX Codex +1 2,000installs amee-joshi-data-engineering-portfolio A reference skill with Azure data engineering examples: Bronze–Silver–Gold layers, Delta Lake, dimensional models and pipeline designs. CX Codex +1 2,000installs data-engineering-study-material A study guide skill for data engineering: explains concepts, shows pipeline examples, and helps with interview prep. CX Codex +1 2,000installs options-analytics-agent-langgraph Builds a LangGraph agent that pulls options data from Polygon.io, caches it in ChromaDB and keeps memory across sessions. Useful when you want your own trading assistant. CX Codex +1 2,000installs harvard-artifacts-collection-data-engineering This skill pulls Harvard Art Museums data into MySQL and renders it in Streamlit. Useful when you want a working ETL example from API to dashboard. CX Codex +1 1,900installs harvard-artifacts-etl-streamlit-analytics Walks your agent through building an ETL pipeline and an analytics dashboard on Harvard Art Museums API data with Python, SQL and Streamlit. CX Codex +1 1,900installs harvard-artifacts-collection-etl-analytics A skill for building an ETL pipeline and analytics dashboard on Harvard Art Museums API data with Python, SQL and Streamlit. CX Codex +1 1,900installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor