by jtrackingai
AI-powered GA4 + GTM event tracking — automates site analysis, event schema, GTM sync, preview verification, and publishing. Works with Cursor, Codex, and any AI agent.
# Add to your Claude Code skills
git clone https://github.com/jtrackingai/event-tracking-skillGuides for using ai agents skills like event-tracking-skill.
No comments yet. Be the first to share your thoughts!
Based on votes and bookmarks from developers who liked this skill
Use this skill as the end-to-end coordinator for GA4 + GTM tracking delivery.
Use it when:
Do not assume the user wants the full workflow.
This installed root skill can self-check for newer GitHub versions before you continue.
Before doing any task in this bundle:
SKILL.md. Installer-managed copies usually live under the skills directory configured by your agent environment, such as $CODEX_HOME/skills/event-tracking-skill or an equivalent runtime-managed path.node "<bundle-dir>/runtime/skill-runtime/update-check.mjs" --json.update_available, immediately run node "<bundle-dir>/runtime/skill-runtime/self-update.mjs" --apply.<bundle-dir>/SKILL.md again before continuing so you are using the refreshed instructions.disabled, treat this bundle as a local development link or repo checkout and continue without updating.The skill family is split into one umbrella skill plus seven phase skills:
tracking-discover for crawl coverage, platform detection, and fresh artifact bootstraptracking-group for page-group authoring and approvaltracking-live-gtm for auditing the real live GTM runtime before schema generationtracking-schema for schema preparation, review, validation, and approvaltracking-sync for GTM config generation and synctracking-verify for preview QA and optional publish handofftracking-shopify for Shopify-specific schema, sync, install, and verification rulesIf the request is already bounded to one phase and that phase skill is available, route there instead of inlining the full runbook here.
Once site-analysis.json indicates Shopify, keep discovery and grouping shared, then let tracking-shopify own the Shopify-specific branch.
./event-tracking for CLI commands in this repository. If the wrapper reports that dist/cli.js is missing, run npm run build first. This bundle assumes Node.js 18+, npm, and Playwright Chromium are available for browser-backed commands.<output-root>/<url-slug>). Each iteration inside that artifact should use a distinct run ID with snapshots under versions/<run-id>/.analyze../event-tracking status <artifact-dir-or-file> whenever the current checkpoint or next step is unclear../event-tracking runs <output-root> when the user wants to find recent site runs and does not remember the artifact directory.GOOGLE_OAUTH_CLIENT_ID / GOOGLE_OAUTH_CLIENT_SECRET.analyze, validate-schema --check-selectors, preview, and sync as non-sandbox commands, and do not first attempt them in the sandbox before retrying after interception.sync with TTY enabled unless the user already provided exact --account-id, --container-id, and --workspace-id values. Do not first try non-interactive sync and then retry with TTY.<artifact-dir>/credentials.json; local migration code may also clear or import older credential files when the user asks to reuse or clear stored auth.DO_NOT_TRACK=1 or EVENT_TRACKING_TELEMETRY=0.run-new-setup, run-tracking-update, run-upkeep, run-health-audit. Use start-scenario when the user wants a labeled scenario run without immediate template execution../event-tracking scenario <artifact-dir> --set <scenario> [--sub-scenario ...] [--new-run] for metadata-only adjustments when you should not alter execution flow../event-tracking scenario-check <artifact-dir> when the question is "is this scenario ready" rather than "what is the next workflow checkpoint"../event-tracking scenario-transition <artifact-dir> --to <scenario> [--reason ...] when the user wants an auditable handoff between scenarios.When the user enters through chat and has not yet provided a bounded phase, artifact directory, or exact command, start with an intent-first intake.
Classify the request into one of these entry intents:
resume_existing_run: the user already has an artifact directory or one of its files; inspect the artifacts and use statusnew_setup: net-new tracking implementation from scratch; prefer run-new-setup, then follow its recommended next steptracking_update: revise or extend an existing implementation; prefer run-tracking-updateupkeep: routine maintenance, review, or incremental QA on an existing setup; prefer run-upkeeptracking_health_audit: audit-only assessment of current live tracking; prefer run-health-auditanalysis_only: crawl/bootstrap/discovery only without committing to the full workflow yet; route to tracking-discover and stop after analyzeRules:
scenario and analyze. scenario is run-intent orchestration metadata; analyze is only one execution step.new_setup.analysis_only.resume_existing_run instead of restarting from analyze.Route by user intent and current artifacts:
tracking-discoversite-analysis.json with missing or unconfirmed pageGroups: route to tracking-groupsite-analysis.json with detected live GTM container IDs but no live baseline review yet: route to tracking-live-gtmsite-analysis.json or an in-progress event-schema.json: route to tracking-schemagtm-config.json: route to tracking-syncgtm-context.json: route to tracking-verify, with publish treated as a separate explicit actiontracking-shopifyIf only the root skill is available, follow the same routing logic directly and stop at the matching phase boundary.
prepare-schema.pageGroups (before confirm-page-groups and before prepare-schema)event-schema.json (before confirm-schema and before generate-gtm)sync)publish)generate-gtm unless the user explicitly wants --force.tracking-health.json as the publish gate; do not jump to publish when health is missing, manual-only, or blocked unless the user explicitly wants --force.tracking_health_audit as an audit-only scenario. Do not run GTM deployment actions (generate-gtm, sync, publish) unless the user explicitly asks to override.When resuming:
workflow-state.json when presentstatus when the next step is unclearWhen a phase or the full workflow ends, summarize:
Event Table, then Common Properties, then Event-specific Propertiestracking_health_audit and upkeep as separate summary modes even if they share rendering helpersevent-tracking-skill is a local-first AI skill for planning, reviewing, and delivering GA4 + GTM tracking.
Use it when you want an agent to help with:
This README is intentionally user-facing and conversation-first. If you need the CLI surface or maintainer workflow, use DEVELOPING.md.
For a given website, this skill can help produce:
Most users only need the umbrella skill.
Clone the repository locally, then install the skill into your agent skills directory:
git clone https://github.com/jtrackingai/event-tracking-skill.git
cd event-tracking-skill
npm run install:skills
If you do not want to clone the repository, install the root skill directly:
npx skills add jtrackingai/event-tracking-skill
For advanced install options and exported skill bundles:
If you are publishing this skill to ClawHub, publish the exported public bundle instead of the full repository:
npm run export:skills:clawhub
Then upload dist/clawhub-skill-bundles/event-tracking-skill.
That public bundle keeps the agent-facing skill docs and references, but strips the bundled auto-update runtime and other maintainer-only packaging files that trigger broader security scans.
The intended experience is simple: tell your agent what you want in plain language.
Good requests usually include one or more of:
./output or /tmp/output./output/example_comFor a new setup, the output root is not the artifact directory itself. The agent/CLI creates one artifact directory per site under that root, for example ./output/example_com.
New setup from scratch:
Use event-tracking-skill to plan GA4 + GTM tracking for https://www.example.com.
Use ./output as the output root; create the site artifact directory under it.
Start from a fresh run and stop after the event schema is ready for review.
New setup with implementation context:
Use event-tracking-skill to set up tracking for https://www.example.com.
Use /tmp/output as the output root, so this site's artifacts go under /tmp/output/www_example_com.
GA4 Measurement ID is G-XXXXXXXXXX.
We care most about signup, pricing, contact, and demo intent.
Audit only:
Use event-tracking-skill to run a tracking health audit for https://www.example.com.
I only want to understand the current live GTM setup and whether we should repair or rebuild.
Do not continue into deployment work.
Routine upkeep:
Use event-tracking-skill to do an upkeep review for this existing run:
./output/example_com
Tell me what is still healthy, what drifted, and what needs repair.
Update an existing artifact:
Use event-tracking-skill to resume this artifact directory:
./output/example_com
Tell me the current checkpoint and continue only through schema review.
Page-group review only:
Use event-tracking-skill to review and refine the page groups in:
./output/example_com/site-analysis.json
Focus on business intent, not just URL shape.
Shopify branch:
Use event-tracking-skill for this Shopify storefront:
https://store.example.com
I want the Shopify-specific tracking path, not the generic website flow.
This skill is best when you want the agent to act like a tracking lead, not just a command runner.
A typical conversation flow is:
npm install triggers the package postinstall step that installs the browser binaryDO_NOT_TRACK=1 or EVENT_TRACKING_TELEMETRY=0This skill reflects the implementation workflow behind JTracking.
If you need a more advanced setup, JTracking also supports:
This project is licensed under the Apache License, Version 2.0. See LICENSE for the full text.
Use of the JTracking name, logo, and other brand assets is not granted under this license.