New: SEO Blog Writer, a readable, checked blog post for your site every week. Pay once, download straight away.

See it
AI Skill Up
Browse skills

Setting up Google Analytics and Search Console with Claude Code

Claude Code can write the tag, and with Claude in Chrome it can click through Google's consoles too. What that looks like, what stays yours, and what to check.

Setting up analytics for a new site is two jobs. One is code: put the tag in the right file, with consent defaults, only in production. The other is an hour of clicking through two Google consoles. Claude Code has always been able to do the first. With the Claude in Chrome extension, it can do most of the second as well.

What the full setup involves

  1. Create a GA4 property and a web stream, and read the measurement ID.
  2. Raise data retention to 14 months; see GA4 data retention.
  3. Put the tag in your code, with consent defaults.
  4. Deploy, and check the tag is live.
  5. Add the site to Search Console and verify it.
  6. Submit the sitemap.
  7. Link Search Console to Analytics.

What Claude does in your browser

With Claude in Chrome connected, Claude works in your own Chrome, where you are already signed in to Google. It fills in forms like property name, time zone and currency, reads values back from the page, and presses buttons. It should ask before each step that creates or saves something, so nothing happens in your Google account that you did not approve.

What stays yours

  • Signing in to Google. No tool should type your password.
  • Accepting Google's terms on a new Analytics account.
  • Approving each step that creates something.
  • Deploying the site, the way you always do.

Without the extension

A guided mode works well: one Google screen at a time, with the buttons to press and the value to paste back. Claude writes the code as soon as you paste the measurement ID. Google's screens change from time to time, so instructions that read the page, or describe what to look for rather than pixel positions, age better.

Check the result

Realtime shows your visit, the Search Console property is verified, the sitemap reads Success, and the Search Console link appears in GA4. If Realtime is empty, work through GA4 not collecting data.

GA4 + Search Console Setup is this, packaged as a skill for $5: the Google side in your own Chrome through Claude in Chrome, or guided step by step, the tag in the right file for eleven frameworks with consent defaults, and a check that it is live after you deploy. It never types a password or accepts Google's terms for you.

Questions

Can Claude Code set up Google Analytics?

It can write the tag into your code on its own. With the Claude in Chrome extension connected, it can also work in Google Analytics and Search Console in your browser, where you are already signed in.

Does Claude need my Google password?

No, and it should never ask for it. It works in your own Chrome session. Signing in and accepting Google's terms are steps you do yourself.

What if I do not use Claude in Chrome?

Claude can walk you through the same screens one step at a time while it handles the code, or use Google's APIs through the Google Cloud CLI if you prefer the terminal.

Or skip the afternoonand drop one in.