← 返回 Skills 市场
jtrackingai

Analytics Tracking Automation — GA4 + GTM Setup via AI

作者 jtrackingai · GitHub ↗ · v1.0.14 · MIT-0
cross-platform ✓ 安全检测通过
170
总下载
1
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install event-tracking-skill
功能描述
Use when you need GA4 + GTM tracking delivery from site discovery through publish, or when the right phase entry point is still unclear.
使用说明 (SKILL.md)

Analytics Tracking Automation

Use this skill as the end-to-end coordinator for GA4 + GTM tracking delivery.

Use it when:

  • the user needs a full GA4 + GTM implementation flow, from analysis to go-live readiness
  • the request spans multiple workflow phases (discovery, schema, sync, verification, publish)
  • the correct entry point is still unclear and you need this skill to route to the right phase

Do not assume the user wants the full workflow.

Skill Family

The skill family is split into one umbrella skill plus seven phase skills:

  • tracking-discover for crawl coverage, platform detection, and fresh artifact bootstrap
  • tracking-group for page-group authoring and approval
  • tracking-live-gtm for auditing the real live GTM runtime before schema generation
  • tracking-schema for schema preparation, review, validation, and approval
  • tracking-sync for GTM config generation and sync
  • tracking-verify for preview QA and optional publish handoff
  • tracking-shopify for Shopify-specific schema, sync, install, and verification rules

If 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.

Shared Contract

  • Use the public command event-tracking in this repository. If dist/cli.js is missing, run npm run build first.
  • For public/ClawHub installs, you must run this first before any event-tracking command: npx skills add jtrackingai/analytics-tracking-automation.
  • Keep one artifact directory per site at \x3Coutput-root>/\x3Curl-slug>.
  • If the user already provides an artifact directory or one of its files, resume from the earliest unmet prerequisite instead of restarting from analyze.
  • Use event-tracking status \x3Cartifact-dir-or-file> whenever the current checkpoint or next step is unclear.
  • Use event-tracking runs \x3Coutput-root> when the artifact directory is unknown but the output root is known.
  • Prefer high-level entry commands for user-facing flows: run-new-setup, run-tracking-update, run-upkeep, run-health-audit.
  • Telemetry consent is a required user-choice checkpoint. If consent is unanswered when any workflow command surfaces the prompt, stop 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 workflow mode metadata as an internal workflow-state layer, not a user-facing command surface.
  • analyze, validate-schema --check-selectors, preview, and sync each need outbound HTTP and a real Chromium; sync additionally needs a local loopback callback on 127.0.0.1 for Google's OAuth consent redirect. Run them in an environment that permits those capabilities so Playwright and the OAuth callback can complete.
  • Run prompt-driven GTM sync with an interactive TTY from the start 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, 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 status
  • new_setup: net-new tracking implementation from scratch; prefer run-new-setup, then follow its recommended next step
  • tracking_update: revise or extend an existing implementation; prefer run-tracking-update
  • upkeep: routine maintenance, review, or incremental QA on an existing setup; prefer run-upkeep
  • tracking_health_audit: audit-only assessment of current live tracking; prefer run-health-audit
  • analysis_only: crawl/bootstrap/discovery only without committing to the full workflow yet; route to tracking-discover and stop after analyze

Rules:

  • Do not ask the user to choose between internal workflow metadata flags and analyze.
  • If intent is ambiguous, ask one short plain-language intake question using user-facing terms such as "new setup", "update existing tracking", "upkeep", "health audit", "analyze only", or "resume an existing run".
  • If the user gives a fresh URL and asks to set up tracking, default to new_setup.
  • If the user gives a fresh URL and only asks to inspect the site, analyze structure, or review current tracking signals, default to analysis_only.
  • If the user gives an artifact directory or workflow file, default to resume_existing_run instead of restarting from analyze.

Routing Rules

Route by user intent and current artifacts:

  • fresh URL, crawl request, or no artifacts yet: start with tracking-discover
  • site-analysis.json with missing or unconfirmed pageGroups: route to tracking-group
  • confirmed site-analysis.json with detected live GTM container IDs but no live baseline review yet: route to tracking-live-gtm
  • confirmed site-analysis.json or an in-progress event-schema.json: route to tracking-schema
  • approved event-schema.json without gtm-config.json: route to tracking-sync for generate-gtm
  • gtm-config.json: route to tracking-sync
  • gtm-context.json: route to tracking-verify, with publish treated as a separate explicit action
  • Shopify platform confirmation: keep shared early stages, then hand off to tracking-shopify

If only the root skill is available, follow the same routing logic directly and stop at the matching phase boundary.

Stop Rules

  • Do not bypass page-group approval before prepare-schema.
  • For key decision checkpoints, always require explicit user confirmation before continuing:
    • pageGroups (before confirm-page-groups and before prepare-schema)
    • event-schema.json (before confirm-schema and before generate-gtm)
    • GTM target selection (account/container/workspace during sync)
    • publish decision (before publish)
  • If confirmation is missing or ambiguous, stop and ask; do not auto-proceed.
  • Treat telemetry consent the same way as other explicit approval gates: if the user has not chosen yes or no, stop and ask instead of making the decision for them.
  • A broad request such as "full workflow", "全流程", "end-to-end", or "continue all the way" is scope authorization only. It does not count as checkpoint approval.
  • Never record checkpoint approval on the user's behalf with confirm-page-groups --yes or confirm-schema --yes unless the user explicitly confirms that checkpoint in the current turn.
  • When live GTM containers are detected on the site, do not bypass the live baseline review before schema generation.
  • Do not bypass schema approval before generate-gtm unless the user explicitly wants --force.
  • Treat preview QA and publish as separate decisions.
  • Treat 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.
  • Treat Shopify manual verification as the expected path for Shopify runs, not as a fallback error case.
  • Treat tracking_health_audit as an audit-only workflow mode. Do not run GTM deployment actions (generate-gtm, sync, publish) unless the user explicitly asks to override.

Resume And Closeout

When resuming:

  • prefer workflow-state.json when present
  • still inspect the real artifact set if warnings indicate stale gates
  • use status when the next step is unclear

When a phase or the full workflow ends, keep the closeout answer-first:

  • lead with a compact, decision-ready summary in plain language
  • do not dump raw JSON, raw URL lists, or artifact inventory before the summary
  • list files, checkpoint, and next command only after the human-readable summary

References

安全使用建议
This skill appears to do what it says: end-to-end GA4 + GTM orchestration using a Playwright crawler and an interactive Google OAuth flow. Before installing or running it: (1) ensure you have Node.js 18+, npm, and Playwright/Chromium available (the registry metadata did not declare these, but SKILL.md requires them); (2) run it in an environment that permits outbound HTTP and a loopback callback on 127.0.0.1 for Google's OAuth; (3) verify the upstream repository/package (bundle.json points to a GitHub repo) before running any npx/npm install or build steps; (4) understand the tool will store a user-generated Google OAuth refresh token locally in the artifact directory — do not commit that file to source control and rotate/revoke if needed; (5) telemetry is opt-in and documented; answer the telemetry prompt explicitly. The skill’s behavior is coherent, but because it includes network installs and runs a browser and Google OAuth, follow standard caution (review repo, run in a controlled environment) before use.
能力标签
cryptocan-make-purchasesrequires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The skill claims to coordinate GA4 + GTM delivery and all instructions, references, and artifacts align with that purpose (crawling, schema generation, GTM generation, preview, publish). However the published registry metadata lists no required binaries/env vars while SKILL.md explicitly requires Node.js 18+, npm, and Playwright Chromium (outbound HTTP and a local loopback for OAuth). This is an inconsistency between declared metadata and the runtime requirements.
Instruction Scope
SKILL.md only instructs actions consistent with analytics setup: launching a browser crawl (Playwright), reading/writing artifact files in an artifact directory, validating selectors, running Google OAuth consent interactively, and calling GTM APIs for sync/preview/publish. It also includes a telemetry consent gate and explicit rules not to auto-advance approval gates. There are no instructions to read unrelated system files or transmit secrets to third parties.
Install Mechanism
The bundle is instruction-only (no install spec), which lowers static risk. Nevertheless the runtime docs expect building/running a Node CLI and even include an optional 'npx skills add jtrackingai/analytics-tracking-automation' step for certain installs — this will fetch code at runtime. That behavior is reasonable for a Node-based CLI but it means running network installs/build steps when you follow the instructions; verify the upstream package/repo before running.
Credentials
No environment variables are declared, and the only credential footprint is an interactively obtained Google OAuth refresh token stored locally per-artifact (credentials.json). That design is proportionate to the skill's purpose and the SKILL.md documents scope limits and local storage/rotation. Telemetry is opt-in and the consent flow is documented.
Persistence & Privilege
The skill is not forced-always and does not request system-wide privileges. It writes per-site artifact files (including the user-generated credentials.json) in an artifact directory — expected for a CLI tool. agents/openai.yaml allows implicit invocation (normal for skills); this combined with ordinary behavior is expected but worth noting for autonomous agent runs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install event-tracking-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /event-tracking-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.14
**Added required telemetry consent prompt and updated environment requirements.** - Introduced a strict user-choice checkpoint for anonymous telemetry consent; workflow cannot continue without explicit consent/refusal. - Added `references/telemetry-consent.md` to specify the telemetry consent interaction contract. - Updated environment requirements and compatibility details for OAuth and browser-backed phases. - Clarified workflow, routing, and stop rules regarding telemetry, environment setup, artifact checkpoints, and consent handling.
v1.0.13
- Updated telemetry notice in compatibility section: anonymous telemetry is now described as opt-in, with previous disablement environment variable documentation removed. - No source code or logic changes; documentation only.
v1.0.12
- Migrated to use the public event-tracking CLI command for all workflows. - Removed 39 bundled runtime distribution files, including CLI entrypoints and internal crawler/generator modules. - Updated setup instructions to require skill installation via `npx skills add jtrackingai/analytics-tracking-automation` for public and ClawHub usage. - Adjusted contract to require `npm run build` if CLI is missing, ensuring clear build prerequisites. - All resumes, routing, and workflow logic remain consistent, but now operate through the standalone event-tracking invocation.
v1.0.11
**Summary:** Transitioned to a new streamlined skill bundle with a renamed identity, significant refactor, and simplified workflow for analytics tracking automation. - Renamed from `event-tracking-skill` to `analytics-tracking-automation` for clearer positioning. - Replaced legacy files and CLI tooling with a new runtime CLI interface and bundled JS executables. - Simplified workflow contract and documentation; removed old architecture and setup files. - Updated and clarified shared contract, conversation intake, routing, and stop rules for users. - Reduced repository footprint by removing obsolete scripts, templates, and documentation. - Improved alignment of artifact handling, confirmation checkpoints, and user interaction flows.
v1.0.9
**Adds contract file and improves compatibility/readme coverage** - Added `skills/contract.json` to formally define the implementation contract. - Added sample skill evaluation fixtures and a skill contract test. - Added `scripts/sync-skill-docs.mjs` for doc syncing operations. - Updated documentation with explicit Node.js, Playwright, and telemetry requirements under a new compatibility section. - SKILL.md copy and routing flow improved for accuracy and clarity.
v1.0.8
**Major update: Introduces a full end-to-end skill bundle for GA4 + GTM event tracking, modularizes workflow by phase, and adds auto-update features.** - Added new modular skill structure: umbrella skill plus dedicated skills for discovery, grouping, live GTM audit, schema, sync, verification, and Shopify-specific logic. - Introduced self-update mechanism with version check and auto-refresh instructions. - Revised workflow to require explicit user confirmation at every critical checkpoint (grouping, schema, GTM target, publish). - Improved routing: automatically directs requests to the correct workflow phase based on intent and artifact state. - Expanded developer and contributor documentation, including architecture, development, and install guides. - Added multiple scripts and configuration files to automate checks, updates, and onboarding flow.
v1.0.0
Event Tracking Skill v1.0.0 - Initial release for automated GA4 event tracking setup via GTM. - Supports both generic and Shopify sites with tailored workflows for each. - Guides users through analysis, page grouping, event schema generation, and review. - Ensures user confirmation at each key step before progressing. - Includes built-in Shopify schema bootstrapping and custom pixel artifact support. - Strong focus on meaningful business-driven event tracking compliant with JTracking standards.
元数据
Slug event-tracking-skill
版本 1.0.14
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 7
常见问题

Analytics Tracking Automation — GA4 + GTM Setup via AI 是什么?

Use when you need GA4 + GTM tracking delivery from site discovery through publish, or when the right phase entry point is still unclear. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 170 次。

如何安装 Analytics Tracking Automation — GA4 + GTM Setup via AI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install event-tracking-skill」即可一键安装,无需额外配置。

Analytics Tracking Automation — GA4 + GTM Setup via AI 是免费的吗?

是的,Analytics Tracking Automation — GA4 + GTM Setup via AI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Analytics Tracking Automation — GA4 + GTM Setup via AI 支持哪些平台?

Analytics Tracking Automation — GA4 + GTM Setup via AI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Analytics Tracking Automation — GA4 + GTM Setup via AI?

由 jtrackingai(@jtrackingai)开发并维护,当前版本 v1.0.14。

💬 留言讨论