Home › Blog › Installing tracking with Claude: GTM and GA4 in an hour
Blog · Tracking & analytics

Installing tracking with Claude: GTM and GA4 in an hour

On a site you built with AI, Claude sets up Tag Manager, GA4 and Consent Mode via its Chrome extension in about an hour. The steps, what to check and the risks.

On a website you built yourself with AI, Claude in our experience installs the complete measurement setup in about an hour. With the Claude in Chrome extension, it sets up tags and triggers in Google Tag Manager, tests them in preview mode and watches the events arrive live in GA4. You create the accounts and approve the publishing.

The first time I saw it, I honestly found it mind-blowing. For our work as a Google Analytics agency, the time shifts from clicking through interfaces to thinking about what you measure. Below you will read how that hour goes, what a human has to check, and which risks you keep small.

What you arrange yourself beforehand

Claude configures, but you lay the foundation yourself. Claude in Chrome works on all paid Claude plans [1]. The extension uses your browser's login state and pauses at a login screen or CAPTCHA, so that you handle it [2].

Arrange beforehand:

  • The accounts: a Tag Manager container, a GA4 property and, if needed, your ad accounts. A human creates them, in the company's name.
  • A browser profile with only the accounts needed for this job.
  • A measurement plan: which actions count as key events, and which parameters you want with them.
  • A consent banner that complies with Belgian rules.

The hour applies to a site whose code you manage yourself, such as a website without a CMS. There, Claude can also change the code, not just the interfaces.

How the hour goes

The work happens in one session, with you present. Claude opens its own tabs in a visible Chrome window, so you see every click happen live [2].

  1. Code and consent in the site. Claude puts the Tag Manager snippet and the Consent Mode default setting in the HTML. Consent Mode adjusts the behaviour of tags to the visitor's choice [3].
  2. Tags, triggers and variables in Tag Manager. Claude clicks through the interface just as you would, for example a GA4 event tag with measurement ID and event name, linked to a trigger [4].
  3. Testing in preview mode. Preview shows which data goes out when you click a button [4]. Meanwhile Claude reads the console, the network requests and the structure of the page [1].
  4. Watching events arrive live in GA4's Realtime report, or in DebugView, which needs a few extra settings [4].
  5. Reviewing and improving parameters. Claude compares what comes in with the measurement plan: names, values, duplicate events.
  6. You publish, only after you have reviewed the changes yourself.

What a human always checks

Speed is not a check. You judge these five points yourself:

  • Consent. Does nothing that requires consent fire before a choice is made? Test with rejecting and with accepting. Also choose deliberately between basic and advanced: with basic, Google tags only load after a choice; with advanced, they load straight away, with consent denied by default [3]. Cédric explains the difference in Consent Mode v2 in practice.
  • No personal data in event parameters or URLs.
  • The measurement plan itself. Are you measuring what makes money, or only what is easy to measure?
  • One real test conversion, from click to report.
  • The publication. Review what changes in the new container version before you put it live.

The risks, and how to keep them small

The biggest risk for an AI in your browser is prompt injection: hidden instructions in a web page that make Claude do something other than what you asked [5]. Anthropic recommends starting with sites you trust [5].

Anthropic also advises against using the extension for work accounts with sensitive business data [5]. So:

  • Work in a separate browser profile, with only Tag Manager, GA4 and the site itself.
  • Grant the lowest role that will do, and keep publishing with a human.
  • Have changes approved. In the default mode, Claude pauses when something needs your approval [1]; in manual mode, you approve every action separately [5].
  • Don't give Claude passwords. Entering sensitive data is not part of what the extension does [5].

When it takes more than an hour

The hour applies to a straightforward site with forms, buttons and a few key events. Expect more time with:

  • a web shop, where the data layer has to come from the shop system;
  • server-based measurement, such as server-side tagging or Meta's Conversions API. Why you want that next to the pixel is explained by Jonas in Meta Pixel or Conversions API;
  • a CRM that reports back, such as a won deal that has to go back to Google Ads or GA4 as a conversion.

Which step to take first is covered in getting tracking in order: the sequence we follow. Want to know first where your measurement stands now? The free tracking audit lays it all out.

Frequently asked questions

Can Claude create a GA4 or Tag Manager account itself?

Have a human do that, in the company's name. Claude pauses at login screens and CAPTCHAs and asks you to handle them yourself. After that, Claude works within the accounts your browser has access to.

Does this also work on a WordPress site?

Partly. Setting up and testing tags and triggers in Tag Manager works on any site. On a site you built yourself with AI, Claude also changes the code, such as the Tag Manager snippet and the data layer. With plugins and a theme in between, it takes longer.

Which Claude plans include Claude in Chrome?

The extension is available on all paid plans: Pro, Max, Team and Enterprise. If you use it from Claude Code, you need a direct Anthropic plan and you log in with your account, not with an API key.

How do I know my tags only fire after consent?

Test twice in Tag Manager's preview mode: once rejecting, once accepting. Check which tags fire and which requests go out. Let Claude read the network requests along with you, but judge the result yourself.

Sources

  1. Get started with Claude in Chrome — Claude Help Center (Anthropic), accessed 27 Sep 2026
  2. Use Claude Code with Chrome — Claude Code Docs (Anthropic), accessed 27 Sep 2026
  3. Consent mode overview — Google for Developers, accessed 27 Sep 2026
  4. Set up events (Tag Manager) — Google Analytics for Developers, accessed 27 Sep 2026
  5. Use Claude in Chrome safely — Claude Help Center (Anthropic), accessed 27 Sep 2026
·

Further reading

Blog · Tracking & analytics

Are your numbers right?