● Communauté
jtrackingai
⚡ Instantané
event-tracking-skill
par jtrackingai · jtrackingai/event-tracking-skill
GA4 + GTM event tracking automated — site analysis, event schema, GTM sync, preview verification, and publishing from your agent.
Event Tracking Skill automates the full GA4 event-tracking workflow: scan a site, propose an event schema aligned with GA4 conventions, sync to Google Tag Manager, verify in GTM Preview, and publish. Works across Claude Code, Cursor, and Codex. Removes the repetitive part of analytics work.
Pourquoi l'utiliser
Fonctionnalités clés
- Automated site analysis to infer tracking needs
- GA4-conformant event schema generation
- GTM container sync via Tag Manager API
- Preview verification before publish
- One-click publish of the tag container version
- Cross-agent compatible
Démo en direct
Aperçu en pratique
event-tracking-skill.replay
▶ prêt
Cas d'usage
Usages concrets : event-tracking-skill
Quand l'utiliser : You have a site live, no tracking yet, and a deadline.
Déroulement
-
Scan the site
Scan https://example.com and propose a GA4 event schema (page_view, view_item, add_to_cart, etc.).✓ Copié
→ Event list with parameters and sample payloads
-
Sync to GTM
Sync this schema into GTM container GTM-ABCDEF as tags + triggers + variables.✓ Copié
→ Workspace changes reported
-
Preview and verify
Open Preview on staging.example.com and verify each event fires.✓ Copié
→ Per-event fire/miss report
-
Publish
Publish version with notes 'initial GA4 setup'.✓ Copié
→ Live version ID returned
Résultat : A GA4-tracked site with events flowing within an hour.
Pièges
- Events fire but don't appear in GA4 for 24h — Use DebugView in GA4 for real-time verification while testing
- GTM workspace conflicts with manual edits — Create a dedicated workspace for the skill's changes to avoid stepping on someone else
Quand l'utiliser : You have basic tracking but ecommerce funnels are empty.
Déroulement
-
Infer product events
Scan /shop and /checkout and propose the full GA4 ecommerce event list.✓ Copié
→ view_item_list, view_item, add_to_cart, begin_checkout, purchase with items[] param
-
Configure dataLayer push patterns
Generate JS snippets to push each event from our React components.✓ Copié
→ Per-event dataLayer.push snippet
-
Wire in GTM
Create the matching GA4 tags and triggers in GTM.✓ Copié
→ Tags linked to dataLayer events
Résultat : Full ecommerce funnel visible in GA4.
Quand l'utiliser : You're on a new team; GTM was set up years ago; nobody knows what's live.
Déroulement
-
Dump container state
Read GTM container GTM-XXXX and list every active tag, trigger, and variable.✓ Copié
→ Normalized inventory
-
Compare to site
Now scan the site and show which events fire in GTM Preview but aren't meaningful anymore, and which should exist but don't.✓ Copié
→ Gap + cruft list
Résultat : A cleanup PR list for your GTM workspace.
Combinaisons
Associez-le à d'autres MCPs pour un effet X10
SEO audit finds structural issues, event-tracking wires up measurement
Run seo-audit, fix structural gaps, then event-tracking-skill for GA4 setup.✓ Copié
Ecommerce skill sets up funnels, event-tracking instruments them
Use ecommerce-skill to redesign checkout, then event-tracking to wire purchase events.✓ Copié
Coût et limites
Coût d'exécution
- Quota d'API
- GTM Tag Manager API: 250 req / 100s per user; generous for manual setup
- Tokens par appel
- 10-30k tokens per full setup
- Monétaire
- Free (GA4 + GTM are free)
- Astuce
- Scope scans to 5-10 key pages to avoid long crawls.
Sécurité
Permissions, secrets, portée
Stockage des identifiants : Service account JSON in env var or file path. GTM write scope: tagmanager.edit.containers, tagmanager.publish.
Sortie de données : Site scan reads your URLs; schema is pushed to Google Tag Manager.
Ne jamais accorder : tagmanager.delete.containers
- Service account has container edit rights. Scope to a single container, not the whole GCP org.
- Publish step is live on the site. Always verify in Preview first.
Dépannage
Erreurs courantes et correctifs
401 Unauthorized on Tag Manager API
Service account not added as a user on the GTM container. Add in GTM Admin → User Management.
Vérifier : curl -H "Authorization: Bearer $TOKEN" https://tagmanager.googleapis.com/tagmanager/v2/accounts
Preview shows events firing but GA4 DebugView is empty
GA4 config tag missing or sending to wrong measurement ID. Double-check G-XXXXXX in the config tag.
Published version rolls back changes
Another workspace was published after yours. Reconcile both workspaces, merge, republish.
Alternatives
event-tracking-skill vs autres
| Alternative | Quand l'utiliser | Compromis |
| Manual GTM setup | You need custom logic the LLM can't safely generate | Slower, more error-prone |