@weppa-cloud/mcp-google-tag-manager
v1.0.1
Published
MCP server for Google Tag Manager - Manage tags, containers, and marketing tools with AI
Maintainers
Readme
Google Tag Manager MCP Server
MCP server for Google Tag Manager - Manage tags, containers, and marketing tools with AI.
Features
- 🏷️ Complete Tag Management: Create, update, and manage GA4, Facebook Pixel, and custom tags
- 📦 Container Operations: Handle containers, workspaces, and versions
- 🎯 Trigger Control: Set up page views, clicks, form submissions, and custom events
- 📊 Variable Management: Data layer variables, JavaScript variables, and constants
- 🚀 Publishing: Create versions and publish changes to production
- 🔍 Health Check: Quick overview of your GTM setup
Installation
npm install -g @weppa-cloud/mcp-google-tag-managerConfiguration
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"google-tag-manager": {
"command": "npx",
"args": ["@weppa-cloud/mcp-google-tag-manager"],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/service-account-key.json"
}
}
}
}Alternative credential options:
{
"env": {
"GTM_CREDENTIALS": "/path/to/gtm-credentials.json"
}
}Setup Requirements
- Create a Service Account in Google Cloud Console
- Enable Tag Manager API in your Google Cloud project
- Grant permissions to the service account in GTM (Admin → User Management)
- Download credentials as JSON file
Available Tools
Account & Container Management
gtm_health_check- Quick overview of your GTM setuplist_gtm_accounts- List all accessible accountslist_gtm_containers- List containers in an accountget_gtm_container- Get container detailscreate_gtm_container- Create new container (web, iOS, Android, AMP, server)
Workspace Management
list_gtm_workspaces- List all workspacescreate_gtm_workspace- Create new workspace
Tag Management
list_gtm_tags- List all tags in workspacecreate_gtm_tag- Create new tag (GA4, Facebook, custom HTML, etc.)update_gtm_tag- Update existing tagdelete_gtm_tag- Delete tag
Trigger Management
list_gtm_triggers- List all triggerscreate_gtm_trigger- Create trigger (pageview, click, form, custom)update_gtm_trigger- Update triggerdelete_gtm_trigger- Delete trigger
Variable Management
list_gtm_variables- List all variablescreate_gtm_variable- Create variable (data layer, JavaScript, constant)update_gtm_variable- Update variabledelete_gtm_variable- Delete variable
Version Management
get_gtm_version- Get container version (live or specific)publish_gtm_container- Publish workspace changes to production
Examples
Quick health check
"Check my GTM setup"Create a GA4 configuration tag
"Create a GA4 configuration tag with measurement ID G-XXXXXXXXXX in container GTM-XXXXXX"Set up Facebook Pixel
"Add Facebook Pixel 1234567890 to my container with page view tracking"Create custom event trigger
"Create a trigger for form submissions on the contact form"Publish changes
"Publish my workspace changes with version name 'Added conversion tracking'"Common Tag Types
gaawc- Google Analytics 4 Configurationgaawe- Google Analytics 4 Eventhtml- Custom HTMLimg- Custom Imageflc- Floodlight Counterfls- Floodlight Salestwitter_website_tag- Twitter Pixelasp- AdWords Conversionsp- AdWords Remarketing
Common Trigger Types
pageview- Page ViewdomReady- DOM ReadywindowLoaded- Window Loadedclick- ClicklinkClick- Link ClickformSubmit- Form SubmissionhistoryChange- History ChangecustomEvent- Custom Eventtimer- TimerscrollDepth- Scroll Depth
Support
For issues and feature requests, visit: https://github.com/weppa-cloud/mcp-tools
License
MIT
