Restructure GTM skills into audit → edit → validate workflow: - 60-gtm-audit: MCP-based page scan, site audit, gap analysis, tag design (new code/SKILL.md) - 61-gtm-editor: tag/trigger/variable creation via GTM API, ES5 Custom HTML, dataLayer generation - 62-gtm-validator: QA toolkit with 7 validation modes, naming conventions, cross-platform mapping All three skills use DTM Agent + Chrome DevTools MCP with clear handoff patterns. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.4 KiB
5.4 KiB
name, description
| name | description |
|---|---|
| gtm-audit | Automated GTM audit and analysis. Scans websites for tracking coverage, compares against GTM container config, identifies gaps, and reports to Notion. Uses Chrome DevTools MCP for browser inspection and DTM Agent MCP for container operations. Triggers on "GTM audit", "audit website", "scan page", "check tracking", "tracking coverage", "gap analysis", "site audit", "tag firing check". NOT for creating/modifying tags (use gtm-editor) or validating/QA (use gtm-validator). |
GTM Audit Skill
Analyze GTM implementations by scanning websites and comparing against container configuration.
Available Tools
Browser Inspection (Chrome DevTools MCP)
navigate_page— Load target URLevaluate_script— Capture dataLayer, detect GTM containers, check JS globalslist_network_requests— Capture tag firing network requeststake_screenshot— Document page stateclick/hover— Simulate user interactionslist_console_messages— Check for JS errors
GTM Container (DTM Agent MCP)
dtm_status— Check auth and active containerdtm_list_tags/dtm_list_triggers/dtm_list_variables— Get container configdtm_audit_scan— Scan page with collected data (returns structured PageData)dtm_audit_gap— Run gap analysis (returns GapReport with OK/MISSING/ORPHAN)
Reporting (Notion MCP)
- Write findings to GTM Audit Log:
collection://2cf581e5-8a1e-815a-a7f8-000b88b93585
4 Audit Modes
Mode A: Page Scan (/gtm-audit scan <url>)
Quick single-page diagnostics. No GTM container needed.
navigate_pageto URL, wait for loadevaluate_script: capture dataLayerJSON.stringify(window.dataLayer || [])evaluate_script: detect GTM containers(function(){var s=document.querySelectorAll('script[src*="googletagmanager.com/gtm.js"]');var ids=[];s.forEach(function(el){var m=el.src.match(/id=(GTM-[A-Z0-9]+)/);if(m)ids.push(m[1]);});return JSON.stringify(ids);})()evaluate_script: detect tracking pixels(function(){var f=[];if(window.fbq)f.push('Meta Pixel');if(window.gtag)f.push('GA4');if(window.clarity)f.push('Clarity');if(window.kakaoPixel)f.push('Kakao');if(window.wcs)f.push('Naver');if(window.ttq)f.push('TikTok');return JSON.stringify(f);})()list_network_requests— filter for tag domains- Call
dtm_audit_scanwith collected html, network_requests, datalayer_json - Report findings
Mode B: Site Audit (/gtm-audit site <url>)
Full website coverage audit with auto-discovery.
- Navigate to root URL
evaluate_script: extract all internal links- Classify pages by type (home, product, service, form, blog, about)
- For each page type: run Mode A scan
- Build coverage matrix (page type × event × platform)
- Run Mode C gap analysis against container
- Write comprehensive report to Notion
Mode C: Gap Analysis (/gtm-audit gap <url>) — MOST IMPORTANT
Compare GTM container config against actual tag firing.
dtm_status— verify auth and active containerdtm_list_tags+dtm_list_triggers— get expected configurationnavigate_pageto URLevaluate_script— capture dataLayerlist_network_requests— capture actual tag firings- Call
dtm_audit_gapwith network_requests - Analyze gaps: MISSING (in GTM, not firing), ORPHAN (firing, not in GTM)
- Write to Notion GTM Audit Log
Mode D: Tag Design (/gtm-audit design <url>)
AI-powered analysis of what SHOULD be tracked on a page.
navigate_pageto URLtake_screenshot— visual referenceevaluate_script— inspect DOM: forms, buttons, links, product elementsevaluate_script— capture existing dataLayer schemadtm_list_tags— check existing configuration- Design recommendations: which events, triggers, variables are needed
- Output as structured blueprint (hand off to gtm-editor for implementation)
Detection Patterns
Cloudflare Zaraz Proxy
URLs with /1tbv/ path proxy GA4/Ads through the site's domain:
https://site.com/1tbv/ag/g/c?tid=G-XXXXX → GA4
https://site.com/1tbv/ag/g/c?tid=AW-XXXXX → Google Ads
Server-Side GTM (sGTM)
Custom subdomains: stms.*, sgtm.*, ss.*, tag.*
https://stms.site.com/g/collect?tid=G-XXXXX → GA4 via sGTM
GA4 Multiple Endpoints
One GA4 page_view fires to multiple endpoints — this is normal:
google-analytics.com/g/collectanalytics.google.com/g/s/collectstats.g.doubleclick.net/g/collectwww.google.com/ccm/collect(Consent Mode)- Zaraz proxy endpoints
Notion Report Fields
| Field | Value |
|---|---|
| Site | domain name |
| URL | full URL |
| Container IDs | GTM-XXXXX |
| Audit Status | Pass / Warning / Fail |
| GTM Status | Installed / Not Found / Multiple Containers |
| Tags Fired | [GA4, Google Ads, Meta Pixel, Kakao, Naver, ...] |
| Journey Type | full / pageview / scroll / form / checkout / datalayer |
| Critical Issues | count |
| Issues Count | count |
| Summary | AI-generated findings |
Rules
- Always check
dtm_statusbefore gap analysis - Wait for page to fully load before capturing network requests
- Use
evaluate_scriptto check consent mode before interpreting missing tags - Orphan count may be high due to GA4 multi-endpoint — note this in reports
- Hand off tag creation work to
gtm-editorskill - Hand off QA/validation work to
gtm-validatorskill