October 2026 · Product news

We Built an AI Bridge to Google Tag Manager. Here’s Why It Matters.

Google Tag Manager is essential to modern marketing measurement. It can also be surprisingly difficult to work with. We built Tag Manager MCP to make the setup easier to explore, explain, and manage from a conversation.

AdGurus introduces its Google Tag Manager MCP server

A form is generating leads, but the conversion is missing from your reports. Someone asks whether a purchase tag fires on the right page. You open Google Tag Manager and find dozens of tags, triggers, and variables, some named clearly and others named by someone who left three years ago.

For many marketers, this is where a simple question becomes a long investigation. You need to find the right container, understand how its pieces relate, and work out whether the problem is in the tracking setup or somewhere else.

We built Tag Manager MCP to help with that work. It is an open-source connector that lets a compatible AI assistant inspect and manage a Google Tag Manager setup. Instead of describing your container from memory, you can ask questions about what is actually there, investigate a tag’s configuration, and prepare changes from a chat interface.

We built it for our own work at AdGurus. Now we have shared it on GitHub for anyone who wants to explore it, use it, or improve it.

Building Tag Manager MCP is part of how we approach a broader shift in marketing: AI assistants are becoming more useful when they can work with the systems teams use every day. We also advise teams on adopting agentic AI workflows that make those connections practical.

Quick summary

  • Google Tag Manager helps websites manage tracking tags: the pieces that send information about actions such as page views, form submissions, and purchases to analytics and advertising platforms.
  • MCP, or Model Context Protocol, is a way for AI assistants to connect to external tools and data.
  • Tag Manager MCP gives a compatible assistant access to your actual GTM configuration, so it can help you inspect tags, understand triggers, troubleshoot setup problems, and prepare changes.
  • This is an example of a broader shift in marketing operations: moving from AI that only gives advice to AI that can work with the systems behind the advice.

First, what does Google Tag Manager do?

A website needs to measure what happens on it. Did someone view a product? Submit a lead form? Complete a purchase? These actions can be sent to tools such as Google Analytics and advertising platforms, where they help teams understand performance.

Google Tag Manager, often called GTM, provides a place to manage much of that tracking. Its basic building blocks are straightforward:

  • A tag sends information to another system.
  • A trigger determines when that tag should run.
  • A variable supplies a value the tag or trigger needs, such as a page URL or transaction value.

Google describes these components as working together to decide what information is sent and when. A tag might send a generate_lead event, for example, while its trigger determines which form submission should cause that event to fire. Google’s guide to Tag Manager components explains the relationship in more detail.

The difficulty is rarely understanding one tag in isolation. It is understanding the whole setup. A tag may depend on a trigger, which depends on a variable, which depends on information supplied by the website. When something looks wrong in a report, the marketer often has to trace that chain backward.

That is useful work, but it takes time. And because tracking influences reporting and campaign decisions, guessing is a poor substitute for seeing the configuration itself.

So what is an MCP?

MCP stands for Model Context Protocol. You can think of it as a common way for an AI assistant to connect to external tools.

Without that connection, an assistant can explain what a Google Tag Manager trigger usually does. It can suggest how it might configure a lead event. But it cannot know what is inside your container unless you show it.

With a suitable MCP connection, the assistant can use tools to retrieve information from an external system and, where supported, take actions in it. The answer can be grounded in the setup you are working on rather than a generic example. The MCP specification describes it as a way to connect AI clients with external tools and data.

That difference is the point. “Why isn’t my lead tag working?” becomes a more useful conversation when the assistant can inspect the tag, the trigger attached to it, and the variables it uses. You still need to judge the answer and test the result, but you spend less of the conversation copying settings between windows.

What we built

Tag Manager MCP connects a compatible AI assistant to the Google Tag Manager API. It can discover accounts and containers, inspect tags, triggers, variables, and folders, and help prepare changes in a GTM workspace. It also supports container versions and publishing.

In practical terms, you can ask questions such as:

“Which tags are connected to our lead form trigger?”
“Show me how this purchase tag is configured.”
“Do we have unpublished changes in this workspace?”
“Help me create a tag for our generate_lead event.”

The assistant can then work with information from the container you selected. Google’s Tag Manager API provides access to these configuration elements; our MCP server makes them available within an AI workflow.

This does not mean that a chat response proves a tag fired correctly on a live website. Tag Manager MCP can help inspect and troubleshoot the configuration. To test what happens as someone uses the site, you should still use Google Tag Manager’s Preview and Tag Assistant debugging tools. Both views matter: one shows how the tag is set up, while the other helps verify its behaviour.

Why this matters beyond Tag Manager

The most interesting part of this project is not that marketers can type a question instead of clicking through menus. It is what becomes possible when an AI assistant can move through an operational workflow with real context.

Consider a common tracking request: “We need to measure qualified lead submissions.”

That request has several steps. Someone has to define what counts as a qualified lead, find the relevant form or event, inspect the existing setup, decide whether a new tag or trigger is needed, prepare the change, test it, and make sure the resulting event is useful in reporting. If each step happens in a different conversation, document, or browser tab, context gets lost.

An agentic AI workflow can help carry context from one step to the next. An assistant can inspect the current setup, identify what it needs to know, propose a change, and help the team check the result. A person remains responsible for the measurement decision and for approving what goes live.

This is why we believe connected AI will become an important part of marketing operations. Marketing teams already work across advertising platforms, analytics, websites, CRMs, and reporting systems. Much of their time goes into finding the right information, reconciling it, and making careful changes. AI becomes more useful when it can participate in that work with access to the relevant systems.

It also changes the questions teams can ask. Instead of “How do I create a GTM tag?”, a marketer can ask, “How are we currently measuring leads, and what would need to change to measure this new form?” The second question begins with the business goal and the existing implementation.

Better access still requires good judgment

A connected assistant can make work faster, but speed is not the goal on its own. A tag that fires twice can distort a conversion report. An event with the wrong meaning can lead a campaign team to optimize for the wrong outcome. A technically valid tracking change can still be a bad measurement decision.

That is why the useful workflow is inspect, discuss, prepare, test, then publish. The assistant can help uncover the configuration and reduce repetitive work. The marketer, analyst, or developer still needs to decide what should be measured and verify that it works as intended.

For us, that is the promise of agentic marketing operations: giving people better ways to understand and operate increasingly complex systems, while keeping ownership of the decisions that matter.

Try Tag Manager MCP

We made Tag Manager MCP open source because we think more people should be able to experiment with this way of working. The repository includes the code and setup instructions, and we welcome feedback from marketers, analysts, developers, and anyone who has spent too long trying to work out why a GTM tag is not doing what they expected.

👉 Explore Tag Manager MCP on GitHub

Frequently asked questions

Do I need to know how to code to use Google Tag Manager?

You do not need to write code for every tag, but some tracking setups do require technical knowledge. Understanding what an event means, when it should fire, and how to test it remains important. Tag Manager MCP can help you explore an existing setup and prepare changes; it does not remove the need to validate them.

Can Tag Manager MCP tell me why a tag is not firing?

It can help investigate the tag’s configuration: for example, which trigger is attached and which variables the setup uses. To confirm whether a tag fires during a real visit to your website, use GTM Preview and Tag Assistant. Google’s debugging guide shows how to inspect firing behaviour.

Is MCP an AI model?

No. MCP is a way for an AI application to connect with external tools and data. The AI assistant handles the conversation; an MCP server provides the connection to a system such as Google Tag Manager.

Can I use this with Claude or ChatGPT?

Yes you can, just download it and ask Claude or ChatGPT to set it up for you.

Does using an AI assistant automatically publish changes to my website?

No. Inspecting a setup, preparing a change in a workspace, and publishing a container version are separate steps. Your team should review and test changes before publishing them. The repository documents the publishing controls.

Is Tag Manager MCP free to use?

The source code is publicly available under the MIT license. You will still need your own Google Tag Manager access and an appropriate MCP setup to use it.