gtm-testing
GTM Testing - Validation & Debugging
Guide users through comprehensive testing of GTM tracking implementation. Prefers automated headless testing over manual steps wherever possible.
Testing Philosophy
Four-tier validation approach, ordered by automation level:
- Tier 0 (Automated): Playwright headless tests (no browser needed, fully automated)
- Tier 1 (Manual): Browser Console dataLayer verification
- Tier 2 (Manual): GTM Preview Mode tag firing verification
- Tier 3 (Manual): GA4 DebugView end-to-end verification
Always start with Tier 0 if the user asks "can you do it yourself" or wants automated testing. Fall back to manual tiers only for GTM container and GA4 validation, which require a browser session.
Phase 0: Load Business Context (if available)
More from aimonk2025/google-tag-manager-automation
gtm-implementation
Implements complete GTM tracking including dataLayer events in code and GTM configuration via API. Use when users need to "implement GTM tracking", "add dataLayer events", "create GTM variables and tags", "set up CTA tracking", "implement event tracking", or want to execute a tracking plan. Handles both code implementation (dataLayer.push) and GTM container configuration (variables/triggers/tags) automatically via API. Supports incremental updates and framework-specific patterns (React, Next.js, Vue, etc.).
84gtm-analytics-audit
Comprehensive analytics audit of website codebase to identify trackable elements and assess analytics readiness. Use when users want to "audit my analytics", "scan for trackable elements", "find what I can track", "analyze my website for tracking opportunities", or before implementing GTM tracking. Scans HTML/JSX/TSX/Vue for all clickable elements (buttons, links, forms, etc.), identifies existing tracking code, evaluates DOM structure for analytics, and provides recommendations. Acts as senior frontend engineer with GA4 expertise.
82gtm-setup
Automates Google Tag Manager API setup including googleapis installation, OAuth credential creation, token management, and prerequisites validation. Use when users need to "set up GTM API", "configure GTM API access", "get GTM OAuth credentials", "install googleapis", or encounter authentication errors. Handles complete technical setup from dependency installation through API connection verification.
63gtm-reporting
Generates GTM implementation documentation, reporting impact analysis, GA4 report configurations, and stakeholder summaries. Use when users need to "document GTM implementation", "what reports can I build", "create event schema docs", "generate stakeholder summary", "analyze reporting impact", or want to understand business value of tracking data. Creates technical documentation, suggests GA4 explorations, defines remarketing audiences, and translates technical events into business insights.
61gtm-strategy
Strategic GTM tracking planning with product manager expertise. Use when users need to plan tracking strategy, define what metrics to measure, understand business impact of tracking, create tracking specifications, or need guidance on "what should I track?" questions. Asks discovery questions about business goals, maps objectives to events, defines event taxonomy, and creates structured tracking plans. Trigger on - "plan GTM tracking", "what should I track", "create tracking plan", "define measurement strategy", "GTM strategy".
55gtm-dom-standardization
Standardizes all click-related IDs and CSS classes across website for clean analytics tracking. Use when users want to "standardize analytics classes", "clean up tracking IDs", "prepare DOM for GTM", "fix analytics naming", or "make tracking consistent". Scans entire codebase (HTML/JSX/TSX/Vue) and applies consistent naming convention - IDs as "cta_{location}_{action}" and classes as "js-track js-{category} js-{action} js-{location}". Acts as senior frontend engineer ensuring scalable GA4/GTM implementation.
48