{"id":46800,"date":"2025-08-21T15:48:52","date_gmt":"2025-08-21T13:48:52","guid":{"rendered":"https:\/\/clicktrust.be\/?p=46800"},"modified":"2025-08-21T15:49:50","modified_gmt":"2025-08-21T13:49:50","slug":"how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude","status":"publish","type":"post","link":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/","title":{"rendered":"How to use AI and MCP to prompt the implementation of GTM Tags in Claude"},"content":{"rendered":"\n<p><strong>Reading time: 2 min<\/strong><\/p>\n\n\n\n<p>Manually setting up tags in Google Tag Manager (GTM) can be time-consuming\u2014especially when you\u2019re juggling multiple containers, conversions, and triggers. But what if you could streamline the entire process with a simple AI prompt?<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"GTM MCP\" width=\"1080\" height=\"810\" src=\"https:\/\/www.youtube.com\/embed\/sSZU5dr_jSQ?feature=oembed&#038;enablejsapi=1&#038;origin=https:\/\/clicktrust.be\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Let\u2019s dive in.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Setting Up the MCP for GTM<\/h2>\n\n\n\n<p>Before you start prompting AI to build tags for you, there\u2019s a bit of initial setup. You\u2019ll need to implement the <strong>MCP for GTM<\/strong>. Think of the MCP as a bridge that allows your AI assistant (e.g., Claude or ChatGPT) to access and modify your GTM environment.<\/p>\n\n\n\n<p>Here\u2019s how to set it up:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Copy the following code snippet<\/strong>:<\/li>\n<\/ol>\n\n\n\n<p>},<br>&#8220;gtm-mcp-server&#8221;: {<br>&#8220;command&#8221;: &#8220;npx&#8221;,<br>&#8220;args&#8221;: [<br>&#8220;-y&#8221;,<br>&#8220;mcp-remote&#8221;,<br>&#8220;https:\/\/gtm-mcp.stape.ai\/sse&#8221;<br>]<br>}<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Open your Claude configuration<\/strong>\n<ul class=\"wp-block-list\">\n<li>Navigate to your developer tab in Claude by pressing Cmd + &#8220;,&#8221; and click on edit Config<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-1024x375.png\" alt=\"\" class=\"wp-image-46801\" srcset=\"https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-1024x375.png 1024w, https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-300x110.png 300w, https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-768x282.png 768w, https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-600x220.png 600w, https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28.png 1424w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Paste the MCP snippet<\/strong>\n<ul class=\"wp-block-list\">\n<li>Open the config file and paste the snippet<\/li>\n\n\n\n<li>If you\u2019re using multiple MCPs, just chain them together (Ask Claude to do this for you by pasting the whole code)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Save and relaunch your AI assistant<\/strong><br>After adding the MCP, close the editor and relaunch the environment (e.g., Claude).<\/li>\n<\/ol>\n\n\n\n<p>Once that\u2019s done, you\u2019re ready to prompt your AI.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Test simple prompts to create a Google Ads Tag<\/h2>\n\n\n\n<p>Let\u2019s say you want to create a standard Google Ads conversion tag. Here\u2019s an example of a basic prompt:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u201cCreate a Google Ads tag in this container with conversion ID <code>[your_ID]<\/code> and label <code>[your_label]<\/code>. Name the tag <code>Test Tag MCP<\/code> and set the trigger to a page view on the ClickTrust blog.\u201d<\/p>\n<\/blockquote>\n\n\n\n<p>After submitting this prompt, the AI takes care of everything:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It creates the tag using the specified details.<\/li>\n\n\n\n<li>It assigns a page view trigger.<\/li>\n\n\n\n<li>It installs the tag into your designated container.<\/li>\n<\/ul>\n\n\n\n<p>To verify, simply refresh the GTM container. You\u2019ll see the tag live and configured exactly as prompted.<\/p>\n\n\n\n<p>\u2705 <strong>Result:<\/strong> Google Ads tag with the right ID, label, and a blog page view trigger.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Modify the trigger with a more advanced prompt<\/h2>\n\n\n\n<p>Now let\u2019s do something more dynamic\u2014like triggering the tag on a <strong>specific button click<\/strong> rather than a generic page view.<\/p>\n\n\n\n<p>Here\u2019s the prompt:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u201cCreate a trigger based on the click of the \u2018Send\u2019 button on the ClickTrust About Us page, and replace the existing trigger in the previous tag.\u201d<\/p>\n<\/blockquote>\n\n\n\n<p>What happens next:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The AI fetches and analyzes the HTML of the page.<\/li>\n\n\n\n<li>It identifies the correct element (in this case, a button with the text \u2018Send\u2019).<\/li>\n\n\n\n<li>It creates a new <strong>form submit trigger<\/strong> based on that element.<\/li>\n\n\n\n<li>It replaces the previous page view trigger with this new interaction-based trigger.<\/li>\n<\/ul>\n\n\n\n<p>Again, after refreshing the GTM container, you\u2019ll see:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The trigger has been updated.<\/li>\n\n\n\n<li>The tag now fires only when a user clicks the &#8220;Send&#8221; button on the About Us page.<\/li>\n<\/ul>\n\n\n\n<p>This interaction-based approach is far more valuable in tracking meaningful actions rather than passive page views.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Why This Matters for PPC and Analytics Teams<\/h2>\n\n\n\n<p>For marketers and analysts managing multiple GTM containers across brands or campaigns, this approach offers major benefits:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud83d\udd52 <strong>Time-saving:<\/strong> Eliminate the need to manually click through the GTM UI for routine tags.<\/li>\n\n\n\n<li>\ud83e\udde0 <strong>Accuracy:<\/strong> Minimize human error in tag setup and configuration.<\/li>\n\n\n\n<li>\ud83d\udd04 <strong>Scalability:<\/strong> Easily replicate tag implementations across multiple containers with minor prompt tweaks.<\/li>\n\n\n\n<li>\ud83d\udca1 <strong>Transparency:<\/strong> Prompts and outputs are clearly readable and verifiable\u2014no black-box scripts.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Where to Go From Here<\/h2>\n\n\n\n<p>At CLICKTRUST, we\u2019re committed to exploring and sharing the practical ways AI can enhance PPC workflows\u2014without compromising data accuracy or strategy control.<\/p>\n\n\n\n<p>If this workflow caught your interest, we\u2019ve built an entire training around it.<\/p>\n\n\n\n<p>\ud83d\udc49 <strong>Check out our <a>Generative AI for PPC Training<\/a><\/strong> to learn how to use tools like Claude and ChatGPT to streamline campaign setup, tag management, ad copy, and more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reading time: 2 min Manually setting up tags in Google Tag Manager (GTM) can be time-consuming\u2014especially when you\u2019re juggling multiple containers, conversions, and triggers. But&#8230;<\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"two_page_speed":[],"footnotes":""},"categories":[425],"tags":[],"level":[],"class_list":{"0":"post-46800","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-ai-automation"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use AI and MCP to prompt the implementation of GTM Tags in Claude - Clicktrust<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/\" \/>\n<meta property=\"og:locale\" content=\"nl_BE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use AI and MCP to prompt the implementation of GTM Tags in Claude - Clicktrust\" \/>\n<meta property=\"og:description\" content=\"Reading time: 2 min Manually setting up tags in Google Tag Manager (GTM) can be time-consuming\u2014especially when you\u2019re juggling multiple containers, conversions, and triggers. But...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/\" \/>\n<meta property=\"og:site_name\" content=\"Clicktrust\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/clicktrustbrussels\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-21T13:48:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-21T13:49:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-1024x375.png\" \/>\n<meta name=\"author\" content=\"Enrico Cadei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschreven door\" \/>\n\t<meta name=\"twitter:data1\" content=\"Enrico Cadei\" \/>\n\t<meta name=\"twitter:label2\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minuten\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use AI and MCP to prompt the implementation of GTM Tags in Claude - Clicktrust","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/","og_locale":"nl_BE","og_type":"article","og_title":"How to use AI and MCP to prompt the implementation of GTM Tags in Claude - Clicktrust","og_description":"Reading time: 2 min Manually setting up tags in Google Tag Manager (GTM) can be time-consuming\u2014especially when you\u2019re juggling multiple containers, conversions, and triggers. But...","og_url":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/","og_site_name":"Clicktrust","article_publisher":"https:\/\/www.facebook.com\/clicktrustbrussels\/","article_published_time":"2025-08-21T13:48:52+00:00","article_modified_time":"2025-08-21T13:49:50+00:00","og_image":[{"url":"https:\/\/clicktrust.be\/wp-content\/uploads\/2025\/08\/Screenshot-2025-08-21-at-15.46.28-1024x375.png"}],"author":"Enrico Cadei","twitter_card":"summary_large_image","twitter_misc":{"Geschreven door":"Enrico Cadei","Geschatte leestijd":"3 minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/#article","isPartOf":{"@id":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/"},"author":{"name":"Enrico Cadei","@id":"https:\/\/clicktrust.be\/nl\/#\/schema\/person\/bf07ac7f91b34c401b5f168b492b2f52"},"headline":"How to use AI and MCP to prompt the implementation of GTM Tags in Claude","datePublished":"2025-08-21T13:48:52+00:00","dateModified":"2025-08-21T13:49:50+00:00","mainEntityOfPage":{"@id":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/"},"wordCount":653,"publisher":{"@id":"https:\/\/clicktrust.be\/nl\/#organization"},"articleSection":["AI Automation"],"inLanguage":"nl-BE"},{"@type":"WebPage","@id":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/","url":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/","name":"How to use AI and MCP to prompt the implementation of GTM Tags in Claude - Clicktrust","isPartOf":{"@id":"https:\/\/clicktrust.be\/nl\/#website"},"datePublished":"2025-08-21T13:48:52+00:00","dateModified":"2025-08-21T13:49:50+00:00","breadcrumb":{"@id":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/#breadcrumb"},"inLanguage":"nl-BE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/clicktrust.be\/nl\/blog\/ai-automation\/how-to-use-ai-and-mcp-to-prompt-the-implementation-of-gtm-tags-in-claude\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/clicktrust.be\/nl\/"},{"@type":"ListItem","position":2,"name":"Brainfood","item":"https:\/\/clicktrust.be\/fr\/blog\/"},{"@type":"ListItem","position":3,"name":"AI Automation","item":"https:\/\/clicktrust.be\/category\/ai-automation\/"},{"@type":"ListItem","position":4,"name":"How to use AI and MCP to prompt the implementation of GTM Tags in Claude"}]},{"@type":"WebSite","@id":"https:\/\/clicktrust.be\/nl\/#website","url":"https:\/\/clicktrust.be\/nl\/","name":"Clicktrust","description":"We are CLICKTRUST. Full transparency","publisher":{"@id":"https:\/\/clicktrust.be\/nl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/clicktrust.be\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"nl-BE"},{"@type":"Organization","@id":"https:\/\/clicktrust.be\/nl\/#organization","name":"Clicktrust","url":"https:\/\/clicktrust.be\/nl\/","logo":{"@type":"ImageObject","inLanguage":"nl-BE","@id":"https:\/\/clicktrust.be\/nl\/#\/schema\/logo\/image\/","url":"","contentUrl":"","caption":"Clicktrust"},"image":{"@id":"https:\/\/clicktrust.be\/nl\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/clicktrustbrussels\/","https:\/\/www.youtube.com\/channel\/UCKKPuTA6ssQo_w1Kzs9Ldwg","https:\/\/www.linkedin.com\/company\/clicktrust-marketing\/","https:\/\/instagram.com\/clicktrust?igshid=YmMyMTA2M2Y"]},{"@type":"Person","@id":"https:\/\/clicktrust.be\/nl\/#\/schema\/person\/bf07ac7f91b34c401b5f168b492b2f52","name":"Enrico Cadei","image":{"@type":"ImageObject","inLanguage":"nl-BE","@id":"https:\/\/clicktrust.be\/nl\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2d2b4074a32e00487db8bac9ac404127860162ef7fe5675afa0b327ad69502ec?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2d2b4074a32e00487db8bac9ac404127860162ef7fe5675afa0b327ad69502ec?s=96&d=mm&r=g","caption":"Enrico Cadei"},"description":"Digital Performance Analyst","url":"https:\/\/clicktrust.be\/nl\/author\/enrico-cadei\/"}]}},"_links":{"self":[{"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/posts\/46800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/comments?post=46800"}],"version-history":[{"count":0,"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/posts\/46800\/revisions"}],"wp:attachment":[{"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/media?parent=46800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/categories?post=46800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/tags?post=46800"},{"taxonomy":"level","embeddable":true,"href":"https:\/\/clicktrust.be\/nl\/wp-json\/wp\/v2\/level?post=46800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}