gtm-api

Automate Google Tag Manager container and resource management via the GTM REST API v2.

77|9|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/henkisdabro/claudecode-marketplace --skill gtm-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gtm-api
Source: https://github.com/henkisdabro/claudecode-marketplace/tree/main/gtm-suite/skills/gtm-api
Command: npx skills add https://github.com/henkisdabro/claudecode-marketplace --skill gtm-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-api-python-client, google-auth, and includes references (resource) components.

What problem does it solve?

This Skill provides expert guidance for programmatic GTM operations via the REST API, helping teams automate container management, reduce manual configuration, and integrate GTM workflows into CI/CD pipelines.

Core Features & Use Cases

  • Authentication & Authorization: Service account-based automation for GTM API access.
  • Container Management: Create, read, update, and delete GTM containers, workspaces, and versions.
  • Resource Automation: Programmatic management of Tags, Triggers, and Variables across containers.
  • Bulk Operations: Bulk export/import, cloning, and versioning to accelerate setup and migrations.
  • CI/CD Integration: Integrate GTM changes into deployment pipelines for predictable releases.

Quick Start

Create a service account in Google Cloud, grant GTM access, download the JSON key, install the Google API client, and run a sample script to list GTM containers via the API.

Frequently Asked Questions about gtm-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Google Tag Manager container management with the REST API?

Automate GTM container management by using the GTM REST API v2 with service account authentication to programmatically create, update, and delete containers, tags, triggers, and variables. The Google API Python client handles OAuth 2.0 authentication and hierarchical resource access across accounts, containers, and workspaces.

What authentication do I need to access the GTM API programmatically?

GTM API access requires OAuth 2.0 service account authentication. Create a service account in Google Cloud, grant it GTM permissions, download the JSON key file, and use the google-auth library to authenticate your Python scripts before making API requests.

Can I bulk export and import GTM configurations across multiple containers?

Yes, bulk export and import GTM configurations using the REST API v2 to handle multi-container synchronization, cloning, and migrations. Export containers as JSON backups and programmatically import them to other containers, accelerating setup and reducing manual configuration work.

How do I integrate GTM changes into a CI/CD deployment pipeline?

Integrate GTM into CI/CD by using the REST API v2 with Python client libraries to automate container versioning and publishing as part of your deployment workflow. This enables predictable, version-controlled GTM releases alongside application deployments.

What are the prerequisites for automating GTM operations with Python?

Prerequisites include the google-api-python-client and google-auth libraries, a Google Cloud project with GTM API enabled, a service account with GTM Editor permissions, and the service account JSON key file for authentication in your Python scripts.

Does the GTM API support robust error handling and retry logic for automation?

The GTM REST API v2 supports automation with proper error handling and retry mechanisms. Use the google-api-python-client library to implement logging and retry strategies, ensuring reliable programmatic operations across hierarchical GTM resources.