← 返回 Skills 市场
simonfunk

Google Tag Manager

作者 simonfunk · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
648
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install google-tag-manager
功能描述
Manage Google Tag Manager containers, tags, triggers, variables, and versions via the GTM API v2. Use when the user wants to list, create, update, delete, or...
使用说明 (SKILL.md)

Google Tag Manager Skill

Interact with the GTM API v2 to manage containers, workspaces, tags, triggers, variables, and versions.

Authentication

The GTM API uses OAuth2 via a Google Cloud service account.

Setup

  1. Enable Tag Manager API in Google Cloud Console
  2. Create a service account with key (JSON)
  3. Grant the service account access in GTM (Admin → User Management → add service account email)
  4. Set env vars:
    • GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
    • GTM_ACCOUNT_ID=123456
    • GTM_CONTAINER_ID=789012

Script

All operations use scripts/gtm.sh. Run without args to see usage:

scripts/gtm.sh \x3Ccommand> [args...]

Commands

Command Description
accounts List all GTM accounts
containers [accountId] List containers in account
workspaces List workspaces in container
tags [workspaceId] List tags in workspace (default: latest)
tag \x3CtagId> [workspaceId] Get a specific tag
create-tag \x3CjsonFile> [workspaceId] Create a tag from JSON
update-tag \x3CtagId> \x3CjsonFile> [workspaceId] Update a tag
delete-tag \x3CtagId> [workspaceId] Delete a tag
triggers [workspaceId] List triggers
trigger \x3CtriggerId> [workspaceId] Get a specific trigger
create-trigger \x3CjsonFile> [workspaceId] Create a trigger from JSON
update-trigger \x3CtriggerId> \x3CjsonFile> [workspaceId] Update a trigger
delete-trigger \x3CtriggerId> [workspaceId] Delete a trigger
variables [workspaceId] List variables
variable \x3CvariableId> [workspaceId] Get a specific variable
create-variable \x3CjsonFile> [workspaceId] Create a variable from JSON
update-variable \x3CvariableId> \x3CjsonFile> [workspaceId] Update a variable
delete-variable \x3CvariableId> [workspaceId] Delete a variable
built-in-vars [workspaceId] List enabled built-in variables
enable-built-in \x3Ctype,...> [workspaceId] Enable built-in variable(s)
versions List container version headers
version \x3CversionId> Get a specific version
version-live Get the live (published) version
create-version [workspaceId] [name] [notes] Create version from workspace
publish \x3CversionId> Publish a container version

Workspace Resolution

Most commands accept an optional workspaceId. If omitted, the script auto-resolves to the Default Workspace (the first workspace returned by the API — typically "Default Workspace").

Common Recipes

Create a Google Ads Conversion Tag

See references/recipes.md for JSON templates for:

  • Google Ads Conversion Tracking tag
  • GA4 Event tag
  • Custom Event trigger (dataLayer)
  • Cross-domain tracking linker

Workflow: Add Tag → Create Version → Publish

# 1. Create trigger
scripts/gtm.sh create-trigger trigger.json

# 2. Create tag referencing the trigger
scripts/gtm.sh create-tag tag.json

# 3. Create version from workspace
scripts/gtm.sh create-version "" "v1.2 - Added conversion tag"

# 4. Publish
scripts/gtm.sh publish \x3CversionId>

API Reference

For full resource schemas and trigger types, see references/api-reference.md.

安全使用建议
This skill appears to be a straightforward GTM API CLI, but before installing or providing credentials: 1) confirm why the registry metadata omits the environment variables declared in SKILL.md — treat that as a publisher oversight until clarified; 2) only provide a Google service-account JSON limited to the required GTM scopes and grant the service account the minimum GTM user permissions (avoid broader project credentials); 3) be aware the script can create/update/publish containers (high privilege) — review any JSON you pass to create/update operations; 4) the recipes include example domains (geo.creaitor.ai / app.creaitor.ai) — replace with your own domains to avoid accidentally linking to third-party hosts; 5) the Python JWT helper needs PyJWT/cryptography if gcloud isn't available — installing those is required for the script to mint tokens. If the publisher can fix the metadata to declare the required env vars and clarify example placeholders, that would raise confidence.
功能分析
Type: OpenClaw Skill Name: google-tag-manager Version: 1.0.0 The OpenClaw skill `google-tag-manager` is designed to manage Google Tag Manager resources via the GTM API v2. The `SKILL.md` clearly outlines its purpose and required environment variables, including `GOOGLE_APPLICATION_CREDENTIALS` for a service account key. The core script `scripts/gtm.sh` securely handles authentication by either leveraging `gcloud` or generating JWT tokens via an embedded Python script, using appropriate OAuth2 scopes (`tagmanager.edit.containers`, `tagmanager.publish`, `tagmanager.readonly`). All network calls are directed to legitimate Google API endpoints, and JSON parsing/construction is handled safely. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, obfuscation, or prompt injection attempts against the agent. The skill's functionality is entirely aligned with its stated purpose of GTM administration.
能力评估
Purpose & Capability
Name/description match the included CLI script (scripts/gtm.sh) which talks to the GTM API. The script requires GTM_ACCOUNT_ID, GTM_CONTAINER_ID and GOOGLE_APPLICATION_CREDENTIALS — all appropriate for GTM operations. However, the registry metadata claims no required env vars/credentials, which is inconsistent with the SKILL.md and the script.
Instruction Scope
SKILL.md instructs the agent/user to set the service-account JSON path and account/container IDs and to run the provided script; the script only calls tagmanager.googleapis.com and does not attempt to read unrelated system files. It does read the service account JSON (expected) and may call gcloud if present (expected).
Install Mechanism
No install spec — instruction + script only. The script uses curl and python; there is no remote download or extraction of third-party archives. Note: the embedded Python helper requires PyJWT/cryptography if gcloud is not present, so users may need to install those packages locally.
Credentials
The env vars the script uses (GOOGLE_APPLICATION_CREDENTIALS, GTM_ACCOUNT_ID, GTM_CONTAINER_ID) are appropriate. The OAuth scopes used (tagmanager.edit.containers, tagmanager.publish, tagmanager.readonly) allow modification and publishing of GTM containers — this is necessary for create/update/publish operations but is a high-privilege capability. Also note the registry metadata lists no required credentials while SKILL.md expects them; that's an inconsistency to resolve.
Persistence & Privilege
The skill does not request always:true, does not claim to run persistently, and does not alter other skills or system-wide settings. Autonomous invocation (disable-model-invocation=false) is normal for skills but increases blast radius only if the skill were malicious.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install google-tag-manager
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /google-tag-manager 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: GTM API v2 CLI for tags, triggers, variables, versions, and publishing.
元数据
Slug google-tag-manager
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Google Tag Manager 是什么?

Manage Google Tag Manager containers, tags, triggers, variables, and versions via the GTM API v2. Use when the user wants to list, create, update, delete, or... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 648 次。

如何安装 Google Tag Manager?

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

Google Tag Manager 是免费的吗?

是的,Google Tag Manager 完全免费(开源免费),可自由下载、安装和使用。

Google Tag Manager 支持哪些平台?

Google Tag Manager 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Google Tag Manager?

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

💬 留言讨论