Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

google-tag-manager

bởi simonfunk

Web & Frontend Development
426Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Manage Google Tag Manager containers, tags, triggers, variables, and versions via the GTM API v2.

Mô tả

Kỹ năng này làm gì

Manages Google Tag Manager containers, tags, triggers, variables, and versions through the GTM API v2. All operations run via a shell script that wraps authenticated API calls. Covers the full publish workflow from workspace changes to live container versions.

Scripting GTM changes through the API is faster and more repeatable than clicking through the GTM web interface, especially for environments with many containers or frequent deployments.

Khi nào nên dùng

  • Adding a Google Ads conversion tag to a container without touching the GTM UI
  • Publishing a new container version after a batch of tag changes
  • Auditing all triggers and variables in a GTM workspace
  • Enabling built-in variables for dataLayer event tracking
  • Setting up cross-domain tracking linker tags programmatically

Quy trình ví dụ

ĐẦU VÀO

User asks: Add a conversion tag with a custom event trigger, then publish it

AGENT
  1. 1

    Creates a custom event trigger from a JSON definition using create-trigger

  2. 2

    Creates a Google Ads conversion tag referencing the new trigger using create-tag

  3. 3

    Creates a named container version from the current workspace using create-version

  4. 4

    Publishes the version to make it live using publish with the returned versionId

ĐẦU RA

A new container version is published with the conversion tag active on the target site

Yêu cầu

  • GTM_ACCOUNT_ID environment variable (numeric account ID from tagmanager.google.com)
  • GTM_CONTAINER_ID environment variable (numeric container ID)
  • GOOGLE_APPLICATION_CREDENTIALS environment variable (path to Google Cloud service account JSON key file)
  • Google Cloud service account with Tag Manager API enabled and GTM user access granted

Cài đặt

clawhub install simonfunk/google-tag-manager

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết