Agent skill

Google Tag Manager

by VKirill in VKirill/claude-lane-stack

[RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy…

MITAuto-check passedBackend & APIs

Install Google Tag Manager

skills CLI
$ npx skills add VKirill/claude-lane-stack --skill google-tag-manager -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VKirill/claude-lane-stack google-tag-manager --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VKirill/claude-lane-stack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/lane-stack/skills/google/google-tag-manager .claude/skills/google-tag-manager && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
google-tag-manager
GitHub stars
122
Token cost
~3.1k tokens
SKILL.md length
1,402 words
Files
9 (incl. references)
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

[RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy…

  • Etag concurrency
  • SKILL.md covers 🎯 Version Requirements (June…, Usage, Use this skill when and Do not use this skill when, plus 6 more sections
  • Reaches googleapis.com and tagmanager.googleapis.com
  • Tasks that involve Go-to-market strategy

What it does

Google Tag Manager is an agent skill from VKirill/claude-lane-stack. [RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy, Tag/Trigger/Variable CRUD, version create + publish + rollback (two-step). Use when: gtm, tag manager, containers, workspaces, publish, rollback, etag concurrency, write quotas. SKIP: gtm server-side container code (→gtm-server-side if it exists, else omit); GA4 measurement protocol (→google-analytics); legacy ga.js.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `references/cookbook.md`, `references/errors.md` and `references/resources-hierarchy.md`).

It sits in Backend & APIs, covering Go-to-market strategy and Backend development. It works with Google Analytics. The repository describes itself as: Multi-agent AI coding factory for one person — Claude Code PM + Codex/Qwen/Grok/Kimi/AGY writers, durable conveyor, auto-merge to main. The licence is MIT.

When your agent uses it

  • Etag concurrency
  • Tasks that involve Go-to-market strategy
  • Tasks that involve Backend development

Example prompts

  • “/google-tag-manager”

Requirements

  • Python 3
  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 45fa19e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • googleapis.com
    • tagmanager.googleapis.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Google Tag Manager loads about 3.1k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 129 tokens; SKILL.md has 1,402 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from VKirill/claude-lane-stack at commit 45fa19e, republished under its MIT licence (© VKirill). 1,402 words, ~3,096 tokens.

Download SKILL.mdSave it as .claude/skills/google-tag-manager/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
google-tag-manager
description
[RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy, Tag/Trigger/Variable CRUD, version create + publish + rollback (two-step). Use when: gtm, tag manager, containers, workspaces, publish, rollback, etag concurrency, write quotas. SKIP: gtm server-side container code (→gtm-server-side if it exists, else omit); GA4 measurement protocol (→google-analytics); legacy ga.js.
stacks
google-tag-manager, marketing-tech, nodejs, python
tags
google, gtm, tag-manager, containers, workspaces, publish, rollback, marketing
source
vechkasov-global-skills
risk
high-stakes
<!-- versions:start -->

🎯 Version Requirements (June 2026)

Primary pins:

  • GTM API: v2 (stable)
  • googleapis (Node): 144.x
  • google-api-python-client: 2.x
  • Node.js: 24.x (Active LTS)
  • Python: 3.14.x

Source of truth: STACK_VERSIONS.md — verified 2026-06-11

<!-- versions:end -->

Usage

Loaded automatically when its description matches the active task. This is the single source of truth for Google Tag Manager API v2 operations: reading container state, making writes, publishing versions, and rolling back. Read the section you need, then follow the link to the relevant reference file for full detail.

Use this skill when

  • Listing, creating, or updating GTM containers, workspaces, tags, triggers, or variables programmatically
  • Publishing a workspace to live — requires the two-step create_version + publish flow
  • Rolling back a GTM container to a previous version (two-step: create_version_from_old → publish)
  • Auditing all tags in a container: list tags referencing a specific variable, find unused triggers
  • Bulk-renaming or migrating variables via export-edit-import pattern
  • Cloning a workspace for staging / QA before publish
  • Diagnosing etag conflicts (409) on concurrent container edits
  • Managing write quota (~25 write ops/min/container) and planning batch operations
  • Setting up a service account or OAuth flow for GTM API access
  • Finding account IDs and container IDs via API (accounts.list, containers.list)

Do not use this skill when

  • You need GA4 event analytics (sessions, conversions, reports) — use google-analytics
  • You need Google OAuth / Service Account credential setup — use google-cloud-auth
  • You need to write data into GA4 via Measurement Protocol — use google-analytics
  • You need Yandex.Metrica tag management — different provider; load yandex-metrica
  • You need generic HTTP transport patterns (retries, backoff) — use httpx or nodejs
  • You need GTM server-side container code (sGTM custom templates in JavaScript) — different domain; check gtm-server-side if that skill exists

Purpose

Google Tag Manager API v2 (https://tagmanager.googleapis.com/tagmanager/v2/) is the programmatic surface for managing GTM containers. It exposes a full hierarchy — Account → Container → Workspace → Tag/Trigger/Variable/Folder — with CRUD at every level, plus a publish workflow based on immutable, numbered Versions. Every write that modifies a live container must go through the two-step path: create an immutable Version checkpoint from the Workspace, then publish that Version; direct publish-without-checkpoint is not supported.

This skill is high-stakes because publishing incorrect tags to a live GTM container can instantly break analytics collection, fire unwanted pixels, or block consent flows for every visitor of the site. Rollback is possible but requires the two-step sequence described in references/rollback.md. Write operations consume a conservative per-container quota; exceeding it silently queues or drops changes. Etag-based optimistic concurrency is mandatory on updates to prevent one agent from stomping another's edits.

Capabilities

Authentication

GTM API uses standard Google OAuth 2.0 or a Service Account. The required scope for read-only access is https://www.googleapis.com/auth/tagmanager.readonly. For write operations (create, update, delete, publish) the scope is https://www.googleapis.com/auth/tagmanager.edit.containers. For publishing specifically the scope is https://www.googleapis.com/auth/tagmanager.publish. Service accounts must be granted access in the GTM Account/Container settings (not just IAM). Auth bootstrap is owned by google-cloud-auth.

Full reference: references/setup.md

Resource hierarchy

GTM resources form a strict parent-child tree: Account (one per Google account or organization) → Container (one per site/app) → Workspace (edit sandbox; default workspace always exists) → Tag/Trigger/Variable/Folder (leaf resources within a Workspace). Versions sit alongside Workspaces at the Container level and are immutable snapshots. Permissions are granted at the Account or Container level; a user with container-level access cannot see other containers in the same account.

Full reference: references/resources-hierarchy.md

Tags, Triggers, Variables CRUD

All three resource types follow the same REST pattern under a workspace path: list, get, create, update, delete. Tags reference trigger IDs in firingTriggerIds and blockingTriggerIds. Triggers evaluate conditions and fire tags. Variables resolve values (page URL, data layer values, cookie contents, etc.) that tags and triggers use. Updates require the current fingerprint (etag) in the request body to prevent concurrent-edit conflicts.

Full reference: references/tags-triggers-variables.md

Workspaces

A Workspace is the mutable edit surface inside a Container. The Default Workspace always exists; custom workspaces enable parallel development tracks. A Workspace stays in sync with the published version via the sync endpoint; conflicts (when the live version changed since the workspace was created) are surfaced as a mergeConflict list. getStatus shows all changes not yet in the live version.

Full reference: references/workspaces.md

Versions and publish

A Version is an immutable snapshot of a Container. The workflow to push changes live: (1) call workspaces:create_version on your workspace — this produces a numbered Version; (2) call versions/{versionId}:publish on that Version. The API does not support publishing a workspace directly. After publish, versions:live reflects the newly live state. Versions serve as the audit trail and rollback source.

Full reference: references/versions-publish.md

Rollback

Rollback is a two-step process: you cannot "reset to version N" directly. Step 1: call versions/{old_version_id}:create_version_from_old — this creates a new Version that is a copy of the target old Version. Step 2: call versions/{new_version_id}:publish on the freshly created Version. The previous live Version is preserved in history. In-flight workspace edits are not affected but may conflict with the rolled-back state.

Full reference: references/rollback.md

Etag-based concurrency

Every mutable GTM resource carries a fingerprint field. When two agents edit the same resource concurrently, the second write will receive 409 Conflict if the fingerprint has changed. Always: (1) GET the resource to obtain the current fingerprint, (2) include that fingerprint in the UPDATE body, (3) handle 409 by re-fetching and retrying.

Full reference: references/errors.md

Show full SKILL.md (546 more words)Show less
Errors and quotas

GTM API returns standard Google error JSON. Key codes: 401 (token expired), 403 (missing scope or not granted access on container), 409 (etag/fingerprint conflict on concurrent edit), 429 (write quota ~25 ops/min/container), 500/503 (transient). Exponential backoff with jitter is required on 429 and 5xx.

Full reference: references/errors.md

Real automation examples

Five-to-eight concrete automation recipes: create GA4 event tag, add consent-aware trigger, bulk-rename variables, rollback to version N-1, list tags referencing a specific variable, find unused triggers, clone workspace for staging.

Full reference: references/cookbook.md

Behavioral Traits

  • Always obtain the live versionId before any publish to enable rollback if needed
  • Always read the resource fingerprint before an update — include it in the body to prevent 409
  • Always create a Version (create_version) before publish — no workspace-direct publish path exists
  • Treat write quota as a real constraint: batch related changes in one workspace, avoid per-item loops that fire 25+ writes/min
  • For rollback: never auto-roll back. Present the target version summary to the user, get confirmation, then execute the two-step sequence
  • Treat 409 as expected in multi-agent scenarios; re-GET, merge, retry
  • For bulk operations: list all resources first, filter locally, then write — minimizes API calls and quota consumption

Important Constraints

  • NEVER publish to live without calling create_version first — create_version is the safety checkpoint; without it there is no version to roll back to
  • ALWAYS capture the current liveVersionId before publish — store it so rollback can target the correct old version
  • Rollback requires a confirmation prompt — never auto-rollback — show the user the target version (name, description, creation time) and ask for explicit approval before executing the two-step sequence
  • NEVER send an UPDATE or DELETE without including the current fingerprint in the request body — omitting it risks stomping concurrent edits (409 is the best outcome; silent data loss is the worst)
  • NEVER exceed the write quota (~25 ops/min/container) without exponential backoff — plan bulk operations with delays
  • NEVER commit service account key files to git — use environment variables or a secrets manager
  • ALWAYS verify the service account or OAuth user is granted access at the GTM Account or Container level in the GTM UI, not just at Google Cloud IAM level
  • ALWAYS enable the Tag Manager API in the Google Cloud Console project — a valid key file alone is insufficient
  • Rollback is a TWO-STEP operation: create_version_from_old → publish — there is no single "revert" endpoint
  • google-cloud-auth — OAuth 2.0 user flow, Service Account JWT, ADC, scopes catalog, invalid_grant recovery (required before any GTM API call)
  • google-analytics — GA4 reporting; pair with GTM for the full analytics instrumentation story
  • google-search-console — GSC search data; often used alongside GTM in the same site analytics stack
  • nodejs — Node.js runtime patterns for googleapis library (google.tagmanager('v2'))
  • python — Python runtime patterns for google-api-python-client (build('tagmanager', 'v2', ...))
  • httpx — Python HTTP transport for raw REST calls with bearer tokens
  • postgresql — persistence for version snapshots, audit logs, rollback history

API Reference

TopicFile
Auth (OAuth + Service Account), discover Account/Container IDs, curl + Node + Python initreferences/setup.md
Account → Container → Workspace → Tag/Trigger/Variable/Folder hierarchy, permissions modelreferences/resources-hierarchy.md
Tags, Triggers, Variables CRUD — types catalog, JSON examplesreferences/tags-triggers-variables.md
Workspace lifecycle — default/custom, sync, conflict resolution, getStatus diffreferences/workspaces.md
Version create, publish, get_live, undelete — audit trailreferences/versions-publish.md
Rollback recipe (two-step) — risks, confirmation pattern, code walkthroughreferences/rollback.md
Errors 401/403/409/429/500, etag conflicts, retry policy with exponential backoffreferences/errors.md
Cookbook — 7 real automations end-to-endreferences/cookbook.md

© VKirill, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in plugins/lane-stack/skills/google/google-tag-manager of VKirill/claude-lane-stack.

  • SKILL.md
  • references/cookbook.md
  • references/errors.md
  • references/resources-hierarchy.md
  • references/rollback.md
  • references/setup.md
  • references/tags-triggers-variables.md
  • references/versions-publish.md
  • references/workspaces.md

Open the folder on GitHubat commit 45fa19e

Compare with similar skills

Google Tag Manager next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Google Tag Manager compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Google Tag Manager this skillVKirill/claude-lane-stack122—~3.1kAutomated safety check: PassMIT
Google Tag Managerthatrebeccarae/claude-marketing161—~2.6kAutomated safety check: PassMIT
Backend Development Feature Developmentaiskillstore/marketplace4337 repos~2.9kAutomated safety check: PassNone
Backend Designitseffi/agentic-os114—~474Automated safety check: PassMIT
Gx Ga4 Expertcriptogus/agent-evolve-network288—~749Automated safety check: PassMIT
Pi K8s Deployrodrigorodrigues/microservices-design-patterns187—~1.6kAutomated safety check: PassNone

Similar skills

  • Google Tag Manager

    thatrebeccarae/claude-marketing

    Google Tag Manager expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~2.6k tokensUpdated 4 mo ago
    Marketing & SEOAuto-check passed
  • Orchestrate end-to-end backend feature development from requirements to deployment.

    433 GitHub starsUsed in 7 repos~2.9k tokens
    Backend & APIsAuto-check passed
  • Backend Design

    itseffi/agentic-os

    Design backend architecture for implementation with API contracts, data model changes, service boundaries, security, and observability.

    114 GitHub stars~474 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Gx Ga4 Expert

    criptogus/agent-evolve-network

    Configure GA4 properties, GTM, custom events, conversions, audiences, and BigQuery export.

    288 GitHub stars~749 tokensUpdated yesterday
    DatabasesAuto-check passed
  • Pi K8s Deploy

    rodrigorodrigues/microservices-design-patterns

    Check Docker Hub for a new :latest image on a managed service and roll it out to the home Pi k8s cluster, the same way authentication-service was deployed on 2026-08-29 (SSH + kubectl rollout…

    187 GitHub stars~1.6k tokensUpdated 21 days ago
    DevOps & CloudAuto-check passed
  • Altium Schematic Reader

    Tansuo2021/ADtoKeil

    Read and reason about Altium Designer projects and schematics using structured data from .PrjPcb and .SchDoc files.

    188 GitHub stars~1.4k tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed

More from VKirill/claude-lane-stack

All 49 skills in this repo
  • UI UX Pro Max

    VKirill/claude-lane-stack

    Lane-stack design + brand intelligence (vendored ui-ux-pro-max).

    122 GitHub stars~4.7k tokensUpdated yesterday
    Auto-check passed
  • App Architect

    VKirill/claude-lane-stack

    Owner-facing architect for a new app or service. An agent skill from VKirill/claude-lane-stack.

    122 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Browser QA

    VKirill/claude-lane-stack

    Live browser QA + Playwright-compatible replay. An agent skill from VKirill/claude-lane-stack.

    122 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Copy Project Life

    VKirill/claude-lane-stack

    Карта файлов копирайта в .agents/copy/: шаблоны, статусы, цепочка audience→headlines→ux.

    122 GitHub stars~534 tokensUpdated yesterday
    Auto-check passed
  • Copy Research

    VKirill/claude-lane-stack

    Dispatch copy-lead helpers: Tavily, Codex luna/terra, grok/X, OpenCode DeepSeek, Cursor Grok 4.6 medium-fast.

    122 GitHub stars~827 tokensUpdated yesterday
    Auto-check passed
  • Docs Maintain

    VKirill/claude-lane-stack

    Keep living docs/ honest after code changes. An agent skill from VKirill/claude-lane-stack.

    122 GitHub stars~459 tokensUpdated yesterday
    Auto-check passed

Questions about Google Tag Manager

What does Google Tag Manager do?

[RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy…. Google Tag Manager is an agent skill from VKirill/claude-lane-stack. [RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy, Tag/Trigger/Variable CRUD, version create + publish + rollback (two-step).

When should I use Google Tag Manager?

Google Tag Manager fits situations like: etag concurrency; tasks that involve Go-to-market strategy; tasks that involve Backend development.

How do I install Google Tag Manager in Claude Code?

Run `npx skills add VKirill/claude-lane-stack --skill google-tag-manager -a claude-code`. Or copy the skill folder (plugins/lane-stack/skills/google/google-tag-manager in VKirill/claude-lane-stack) into .claude/skills/google-tag-manager in your project. Claude Code loads it when a task matches its description.

How do I install Google Tag Manager in Codex?

Run `npx skills add VKirill/claude-lane-stack --skill google-tag-manager -a codex`. Or copy the skill folder (plugins/lane-stack/skills/google/google-tag-manager in VKirill/claude-lane-stack) into .agents/skills/google-tag-manager in your project. Codex loads it when a task matches its description.

Can I use Google Tag Manager in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VKirill/claude-lane-stack --skill google-tag-manager -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/google-tag-manager, .gemini/skills/google-tag-manager, .github/skills/google-tag-manager and .opencode/skills/google-tag-manager in your project.

What does Google Tag Manager need to run?

SKILL.md names no scripts, command-line tools or credentials: Google Tag Manager is instructions for the agent only. Our summary lists: Python 3; Node.js.

Does Google Tag Manager access the network?

SKILL.md names 2 domains. In commands or code: googleapis.com and tagmanager.googleapis.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Google Tag Manager safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Google Tag Manager use?

Google Tag Manager is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Google Tag Manager use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 15k tokens, read only when the agent opens those files.

What are the alternatives to Google Tag Manager?

Skills that share tags, products or a category with Google Tag Manager: Google Tag Manager (thatrebeccarae/claude-marketing, 161 stars), Backend Development Feature Development (aiskillstore/marketplace, 433 stars), Backend Design (itseffi/agentic-os, 114 stars) and Gx Ga4 Expert (criptogus/agent-evolve-network, 288 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Google Tag Manager?

VKirill (a GitHub user) maintains it in VKirill/claude-lane-stack, which has 122 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 9, 2026.

Source: VKirill/claude-lane-stack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.