tracking-sync
@jtrackingai · 收录于 1 周前
Use when the user wants GTM-ready config generation, GTM workspace sync, or container selection from an approved schema.
适合你,如果需要在GTM中管理容器和配置
/ 下载安装
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code
~/.claude/skills/(项目级 .claude/skills/)Codex CLI
~/.codex/skills/Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add jtrackingai/analytics-tracking-automation/tracking-sync/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- jtrackingai/analytics-tracking-automation/tracking-sync/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify jtrackingai/analytics-tracking-automation/tracking-sync安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
132GitHub stars
~549最小装载
~549含声明引用
~593文本包总量
镜像托管
怎么用
技能原文 SKILL.md
Tracking Sync
Use this skill for Step 4 and Step 5 work.
Inputs
One of:
- approved
<artifact-dir>/event-schema.json - existing
<artifact-dir>/gtm-config.json
Workflow
If the telemetry consent prompt appears and no prior choice is recorded, stop and follow [../../references/telemetry-consent.md](../../references/telemetry-consent.md) before continuing.
If GTM config does not exist yet:
./event-tracking generate-gtm <artifact-dir>/event-schema.json --measurement-id <G-XXXXXXXXXX>
Then sync:
./event-tracking sync <artifact-dir>/gtm-config.json
If account/container/workspace IDs are already confirmed, skip interactive selection:
./event-tracking sync <artifact-dir>/gtm-config.json --account-id <account-id> --container-id <container-id> --workspace-id <workspace-id>
Hard Rules
- Do not bypass schema approval unless the user explicitly wants
--force. - Treat custom dimensions as a blocking checklist before sync/publish.
- Never auto-select GTM account, container, or workspace for the user.
synccalls Google's official GTM API via interactive OAuth. The consent flow needs outbound HTTP and a local loopback callback on127.0.0.1; runsyncin an environment that permits both.- Run
syncwith an interactive TTY from the start whenever it may prompt for OAuth consent, account, container, workspace, or new workspace name. Non-interactive invocation will fail at the first prompt. - Use non-interactive
synconly when exact--account-id,--container-id, and--workspace-idvalues are already confirmed.
Required Output
Produce and share:
<artifact-dir>/gtm-config.json<artifact-dir>/gtm-context.json<artifact-dir>/workflow-state.json
For Shopify runs, also expect:
<artifact-dir>/shopify-custom-pixel.js<artifact-dir>/shopify-install.md
Closeout Style
- default to a short answer-first sync summary before listing files
- summarize what was generated or synced, what still needs manual selection or approval, and any blocking checklist items first
- keep file listings and follow-up commands after the summary
Stop Boundary
Stop after sync unless the user explicitly asks for verification.
Default next phase:
./event-tracking preview <artifact-dir>/event-schema.json --context-file <artifact-dir>/gtm-context.json
References
- [../../references/output-contract.md](../../references/output-contract.md)
- [../../references/gtm-troubleshooting.md](../../references/gtm-troubleshooting.md)
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →
评论
登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。
…