analytics-tracking-automation
AI-powered GA4 + GTM event tracking automation — analyzes sites, designs event schemas, syncs GTM containers, runs preview verification, and publishes tracking implementations.
Security Assessment
About analytics-tracking-automation
analytics-tracking-automation is an AI-agent skill for planning, implementing, and deploying Google Analytics 4 (GA4) plus Google Tag Manager (GTM) event tracking. It addresses the tedious, error-prone work of standing up analytics on a website by automating the full pipeline: crawling and classifying pages, grouping them by business intent, designing GA4 event schemas, syncing tags/triggers/variables into a GTM container, verifying event firing in preview, and publishing the container version. It supports both generic websites and Shopify storefronts with cart/checkout/purchase tracking.
The workflow is driven by an event-tracking CLI (installed via npm or npx). Commands include init (start a new setup), resume (continue from a checkpoint), audit (compare live GTM config against a recommended plan), sync (push schema to GTM), verify (Playwright-based browser checks against GTM preview mode), and publish (release a container version). Each run writes reviewable, editable artifact files (site analysis, page groups, event schema, sync results, verification report, checkpoint) so work is resumable and inspectable. GTM synchronization uses the Google Tag Manager API and requires Google OAuth, which is set up through official Google Cloud credentials and cached locally in the artifact directory.
It targets analytics engineers, marketers, growth teams, and agencies who need to deploy or audit GA4/GTM tracking quickly and repeatably, especially for e-commerce and Shopify stores. Prerequisites are Node.js 18+, Playwright Chromium (auto-installed), and Google OAuth credentials created in Google Cloud Console.
FAQ
How do I install and run it?
Clone the repo and run npm install then npm run install:skills, or use the no-clone path npx skills add. The primary interface is the event-tracking CLI; every command accepts --help.
What credentials does it need?
To sync with GTM you create Google OAuth 2.0 credentials (Desktop app) in Google Cloud Console with the Tag Manager API enabled, then export GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. The first sync opens a browser for OAuth consent and caches tokens in the run's artifact directory.
Can I review changes before they go live?
Yes. Each run produces artifact files (event-schema.json, gtm-sync-result.json, verification-report.json, and more) that are reviewable and editable, and publishing only happens when you run the publish command after verification passes.
Does it support Shopify?
Yes. Passing --platform shopify uses Shopify-optimized tracking for cart, checkout, and purchase events.
What are the system requirements?
Node.js 18 or newer. Playwright Chromium is auto-installed on first npm install and is used for preview verification.
Install analytics-tracking-automation
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
aradotso/data-skills