Analytics Tracking Automation — GA4 + GTM Setup via AI — 分析 追踪ing 自动化 — GA4 + GTM 设置up via AI
v1.0.14当您需要从网站发现到发布的GA4 + GTM跟踪交付,或者当正确的阶段入口点仍不明确时使用。
运行时依赖
安装命令
点击复制技能文档
分析 追踪ing 自动化
Use this 技能 as the end-to-end coordinator for GA4 + GTM 追踪ing delivery.
Use it when:
the user needs a full GA4 + GTM implementation flow, from analysis to go-live readiness the 请求 spans multiple 工作流 phases (discovery, 模式, 同步, verification, publish) the correct entry point is still unclear and you need this 技能 to 路由 to the right phase
Do not assume the user wants the full 工作流.
技能 Family
The 技能 family is split into one umbrella 技能 plus seven phase 技能s:
追踪ing-discover for crawl coverage, 平台 检测ion, and fresh artifact bootstrap 追踪ing-group for page-group authoring and 应用roval 追踪ing-live-gtm for 审计ing the real live GTM 运行time before 模式 generation 追踪ing-模式 for 模式 preparation, review, 验证, and 应用roval 追踪ing-同步 for GTM config generation and 同步 追踪ing-验证 for preview QA and optional publish handoff 追踪ing-shopify for Shopify-specific 模式, 同步, 安装, and verification rules
If the 请求 is already bounded to one phase and that phase 技能 is avAIlable, 路由 there instead of inlining the full 运行book here.
Once site-analysis.json indicates Shopify, keep discovery and grouping 分享d, then let 追踪ing-shopify own the Shopify-specific branch.
分享d Contract Use the public command event-追踪ing in this 仓库. If dist/命令行工具.js is missing, 运行 npm 运行 build first. For public/ClawHub 安装s, you must 运行 this first before any event-追踪ing command: npx 技能s 添加 j追踪ingAI/分析-追踪ing-自动化. Keep one artifact directory per site at <输出-root>/. If the user already provides an artifact directory or one of its files, 恢复 from the earliest unmet prerequisite instead of re启动ing from analyze. Use event-追踪ing 状态 whenever the current 检查point or next step is unclear. Use event-追踪ing 运行s <输出-root> when the artifact directory is unknown but the 输出 root is known. Prefer high-level entry commands for user-facing flows: 运行-new-设置up, 运行-追踪ing-更新, 运行-upkeep, 运行-健康-审计. Telemetry consent is a required user-choice 检查point. If consent is unanswered when any 工作流 command surfaces the prompt, 停止 and follow telemetry-consent.md as the single-source interaction contract. Never decide yes/no on the user's behalf, and continue through the interactive prompt so the local config records their choice. Treat 工作流 mode metadata as an internal 工作流-状态 layer, not a user-facing command surface. analyze, 验证-模式 --检查-selectors, preview, and 同步 each need outbound HTTP and a real Chromium; 同步 添加itionally needs a local loopback callback on 127.0.0.1 for Google's OAuth consent redirect. 运行 them in an 环境 that permits those capabilities so Playwright and the OAuth callback can complete. 运行 prompt-driven GTM 同步 with an interactive TTY from the 启动 unless exact --account-id, --contAIner-id, and --workspace-id values are already confirmed. Never auto-select a GTM account, contAIner, or workspace on the user's behalf. Do not continue past the phase boundary the user asked for. Conversation Intake
When the user enters through chat and has not yet provided a bounded phase, artifact directory, or exact command, 启动 with an intent-first intake.
Classify the 请求 into one of these entry intents:
恢复_existing_运行: the user already has an artifact directory or one of its files; inspect the artifacts and use 状态 new_设置up: net-new 追踪ing implementation from scratch; prefer 运行-new-设置up, then follow its recommended next step 追踪ing_更新: revise or extend an existing implementation; prefer 运行-追踪ing-更新 upkeep: routine mAIntenance, review, or incremental QA on an existing 设置up; prefer 运行-upkeep 追踪ing_健康_审计: 审计-only assessment of current live 追踪ing; prefer 运行-健康-审计 analysis_only: crawl/bootstrap/discovery only without committing to the full 工作流 yet; 路由 to 追踪ing-discover and 停止 after analyze
Rules:
Do not ask the user to choose between internal 工作流 metadata flags and analyze. If intent is ambiguous, ask one short plAIn-language intake question using user-facing terms such as "new 设置up", "更新 existing 追踪ing", "upkeep", "健康 审计", "analyze only", or "恢复 an existing 运行". If the user gives a fresh URL and asks to 设置 up 追踪ing, default to new_设置up. If the user gives a fresh URL and only asks to inspect the site, analyze structure, or review current 追踪ing 签名als, default to analysis_only. If the user gives an artifact directory or 工作流 file, default to 恢复_existing_运行 instead of re启动ing from analyze. Routing Rules
路由 by user intent and current artifacts:
fresh URL, crawl 请求, or no artifacts yet: 启动 with 追踪ing-discover site-analysis.json with missing or unconfirmed pageGroups: 路由 to 追踪ing-group confirmed site-analysis.json with 检测ed live GTM contAIn