Google Tag Manager (GTM) Management for Openclaw

A comprehensive automation skill for managing Google Tag Manager containers, tags, triggers, and versions via the GTM API v2.

simonfunk
v1.0.0
Feb 17, 2026
0
1.7k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install google-tag-manager

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install google-tag-manager using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Google Tag Manager (GTM) Management?

The Google Tag Manager skill provides a robust interface for interacting with the GTM API v2, allowing developers and marketers to programmatically control their tracking infrastructure. By integrating this skill into your workflow, you can automate the lifecycle of containers, tags, and triggers without manual console entry. As a core component of the Openclaw Skills library, this tool streamlines complex tasks like cross-domain tracking setup, GA4 event implementation, and container versioning. It empowers users to manage multiple GTM accounts and workspaces efficiently through a standardized CLI script, ensuring consistency across tracking environments.

Google Tag Manager (GTM) Management Use Cases

  • Programmatically creating and updating Google Ads conversion tags or GA4 event tags.
  • Automating the deployment of custom event triggers based on dataLayer events.
  • Auditing existing GTM setups by listing all tags, triggers, and variables across workspaces.
  • Managing large-scale container updates and publishing versions across multiple environments.
  • Configuring cross-domain tracking and linker variables via script-based automation.

How Google Tag Manager (GTM) Management Works

  1. The skill authenticates with the Google Tag Manager API v2 using a Google Cloud service account JSON key.
  2. It utilizes the scripts/gtm.sh wrapper to execute specific commands for accounts, containers, or workspaces.
  3. Users perform CRUD operations on tags, triggers, and variables by passing JSON configurations to the CLI script.
  4. The skill handles workspace resolution by automatically identifying the Default Workspace if no specific ID is provided.
  5. It facilitates the creation of new container versions from workspace changes and allows for immediate publication to the live environment.

Google Tag Manager (GTM) Management Setup

Enable the Tag Manager API in the Google Cloud Console and create a service account with a JSON key. Grant the service account access within the GTM Admin panel (Admin → User Management). Finally, set the required environment variables:

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
export GTM_ACCOUNT_ID="123456"
export GTM_CONTAINER_ID="789012"

Verify the installation by listing your GTM accounts:

scripts/gtm.sh accounts

Google Tag Manager (GTM) Management Data Schema & Taxonomy

The skill organizes data around the GTM resource hierarchy, utilizing JSON for all configuration exchanges.

Resource Description Metadata Key
Tags Logic for tracking scripts and pixels tagId, workspaceId
Triggers Conditions that determine when tags fire triggerId, workspaceId
Variables Dynamic values used in tags and triggers variableId, workspaceId
Versions Immutable snapshots of container states versionId
Workspaces Isolated environments for drafting changes workspaceId

Google Tag Manager (GTM) Management Advanced Features

  • Automated workspace resolution logic that defaults to the primary workspace for faster command execution.
  • Bulk management capabilities for enabling or disabling built-in variables via comma-separated strings.
  • Integrated versioning workflow allowing users to create and publish container updates in a single automated sequence.
  • Native support for the Openclaw Skills ecosystem, enabling multi-agent collaboration for marketing analytics audits.
  • Customizable JSON recipe support for standardizing complex GA4 and Google Ads tracking deployments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0