calendar Last updated: 30 October 2026
Data integration
Data Pipelines
Google Analytics
Google Analytics 4
How to's

How to Connect GA4 to Claude: 3 Ways, Including Claude Code

Try It Free

Connect your data in 1 min. Free forever plan

Got insights from this post? Give it a boost by sharing with others!

The fastest way to connect GA4 to Claude is the Windsor.ai connector. Add it in Claude, connect your GA4 property once, and ask about your data in a new chat. If you prefer Google’s own code, the official Google Analytics MCP server runs in Claude Code. For a one-off question, you can also upload a CSV export.

An MCP connection pulls the data when you ask, so there are no manual CSV exports to repeat and no download row limits to work around. A CSV upload is a snapshot of one report.

I use GA4 in Claude mostly to check whether a content update helped readers. I compare engagement, views per session and leads before and after the change. I also use it to decide which of two competing pages to keep.

🚀 Connect GA4 to Claude with Windsor.ai. Free forever plan, no credit card. Try Windsor.ai.

Is there an official Google Analytics connector for Claude?

No. On 30 October 2026, Claude’s directory had no connector from Google for Google Analytics; Google’s own listings there are Google Drive, Gmail, Google Calendar, BigQuery and Compute Engine. What Google does publish is an open-source Analytics MCP server, labelled experimental. Its documented setup runs on your own computer, for Claude Desktop and Claude Code.

Three ways to connect GA4 to Claude

  • Windsor.ai connector: 2 steps and no code, on every Claude plan including Free, in Claude on the web, Claude Desktop and Claude Code. GA4 sits next to 350+ other sources in the same chat.
  • Google’s Analytics MCP server: a Google Cloud project, an OAuth client and Python on your computer. It reads GA4 only, and the queries run on your own project’s quota.
  • CSV export and upload: a few minutes per report, one file at a time. The data stops at the day you exported it.

Method 1: the Windsor.ai connector (2 steps)

Before you start

  • A Google account with at least Viewer access to the GA4 property.
  • A Claude account on any plan.
  • A Windsor.ai account. The free forever plan covers one data source, with no credit card. Questions that combine GA4 with Search Console or ad platforms need a paid plan after the first 30 days, from $19 a month billed annually for three sources, or $99 a month for seven. See pricing.

Step 1: connect GA4 to Windsor.ai

Go to onboard.windsor.ai/app/googleanalytics4, sign in with Google and select the GA4 properties you want in Claude.

Connecting a Google Analytics 4 property in Windsor.ai

Step 2: add Windsor.ai in Claude

In Claude, open Customize, then Connectors, search for Windsor and click Add. Sign in to your Windsor.ai account when asked. Windsor.ai then appears in your connectors list.

Windsor.ai connector in Claude connectors settings

Start a new chat and check the connection:

Using Windsor, list my GA4 properties and show sessions for the last 7 full days, leaving out today.

Claude asks for permission the first time it uses each Windsor tool. Allow once approves a single call, and Always allow stops the prompt for that tool. Compare the number with the GA4 interface for the same dates. GA4’s current day is always incomplete, which is why the prompt leaves it out.

Claude asking permission to use a Windsor.ai tool, with Deny, Always allow and Allow once options

A GA4 traffic overview prompt answered in Claude

GA4 access through Windsor.ai is read-only. Claude can report on your GA4 data but cannot change the property.

In Claude Code

Install the Windsor.ai plugin from the terminal:

claude plugin install windsor-ai

Your GA4 data is then available in Claude Code sessions, next to the files you’re working on.

Method 2: Google’s official Analytics MCP server

Google publishes an open-source MCP server for GA4 on GitHub, labelled experimental. It runs on your computer and reads GA4 only. It is read-only by default: the one write tool, which creates annotations on a property, needs the --allow-write flag and the analytics.edit scope. The setup has four parts:

  • Enable the Analytics Admin API and the Analytics Data API in a Google Cloud project.
  • Create an OAuth client (Desktop app) and sign in with gcloud auth application-default login, using the analytics.readonly and cloud-platform scopes.
  • Install Python 3.10+ and pipx.
  • Add the server to Claude Code with one command:
claude mcp add analytics-mcp --scope user -e "GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_CREDENTIALS_JSON" -e "GOOGLE_PROJECT_ID=YOUR_PROJECT_ID" -- pipx run analytics-mcp

Every step, and the hosted endpoint Google also runs, are in our Google Analytics MCP guide.

Choose this route if you want Google’s own code and need GA4 only. Choose the Windsor.ai connector if you want no setup, or GA4 next to Search Console, Google Ads or your CRM in the same chat.

Method 3: CSV export and upload

For a one-off question, a CSV works:

  1. Open the report in GA4 (for example Traffic acquisition) and set the date range.
  2. Click Share this report, then Download File, then Download CSV.
  3. Delete the summary rows above the table so Claude reads clean columns.
  4. Drag the file into a Claude chat.

A standard report downloads up to 100,000 rows, and an exploration up to 10 million cells, so the row count is rarely the problem. The file is a snapshot of one report, so every follow-up question that needs another dimension means another export. Large files also take up much of Claude’s context.

Prompts for GA4 in Claude

These use real GA4 field names, so Claude can pull them without guessing.

Did a content update help?

Compare the 28 days before and after I updated [page] on [date]. For Google organic sessions that landed on it, show sessions, engagement rate, average engagement time per session, views per session and key events. Put the session count next to every rate, and tell me which differences are large enough to read.

Wait until Google has recrawled the page before you read this. Filter internal traffic too: on one of our pages, the “improvement” was our own team checking the update.

Which of two competing pages should stay?

For [page A] and [page B], show Google organic sessions, engagement rate and average engagement time per session for the last 90 days, and the sessions by default channel group. Flag either page with Paid Search or referral sessions.

Paid and referral sessions mean a page is a live landing page, so check them before any redirect. The method is in how I catch keyword cannibalization with Search Console and Claude.

Traffic quality by channel

Show sessions, engagement rate and session key event rate by session default channel group for the last 28 full days, next to the previous 28 days. Which channel changed most?

A visual GA4 summary built by Claude from Windsor.ai data

Landing pages that get traffic but no leads

List landing pages with more than 200 sessions in the last 90 days, sorted by session key event rate from lowest. Add engagement rate and average engagement time per session.

On pages built to generate leads, that list is where to start testing the page layout.

AI assistant traffic

Show sessions and key events from the AI Assistant channel by landing page for the last 90 days.

GA4’s default channel group has an AI Assistant channel, but many clicks from the ChatGPT and Claude apps arrive without a referrer and count as direct. Read this as a minimum.

Check the numbers before you act on them

Claude’s answer is only as good as the fields it picks. Before you act on a number:

  • Ask Claude to check anything that looks too good or too bad, and to state the fields, filters and date range it used. In our tests it re-pulled the data by day and confirmed or corrected itself.
  • Match the hostname when your GA4 property tracks more than one domain or subdomain. GA4’s landing page path has no host, so the same path on two hosts is added together.
  • Do not add up users across days. A visitor who came on three days is one user in a three-day total and three in the sum of the daily numbers. Ask for the total over the whole period.
  • Watch for (other) and missing small rows. Reports with many distinct values group the rarest into an (other) row, and with Google signals on, GA4 can hold back rows with few users. Fewer dimensions in the question usually bring the rows back.
  • Use the property’s time zone. GA4 cuts days in the time zone set on the property, so a day boundary in another time zone moves sessions between days.
  • Expect Search Console clicks and GA4 sessions to differ. Consent banners, ad blockers and visitors who leave before the tag loads all remove sessions. Compare trends.

More checks, with the numbers from our own property, are in the Google Analytics MCP guide.

Limits to know before you start

  • GA4’s API quota: Google limits each property, whichever tool asks. A standard property gets 200,000 core tokens a day and 40,000 an hour, and Analytics 360 gets ten times more. Most requests cost 10 tokens or fewer, so chat use rarely comes close; a busy property with many dimensions in one question costs more (Google’s Data API quotas).
  • Request size: one Data API request returns at most 10 metrics and 9 dimensions. For wider tables, Claude splits the question into several requests.
  • Freshness: GA4 takes 24 to 48 hours to finish processing a day, and today’s figures are always partial. Windsor.ai also caches the result of an identical query for up to 6 hours; for newer numbers within that window, use Clear Cache in Windsor.ai’s Data Preview, which you can do once every 2 hours.
  • Plans: Windsor.ai’s free forever plan covers 1 data source and 1 account with the last 30 days of data. Longer history or other sources next to GA4 need a paid plan from $19 a month.

Sending GA4 data to Google Sheets or BigQuery

Claude reads GA4 through the connector, so asking questions in a chat needs no export. For a stored copy that other tools read, such as a Data Studio dashboard or a warehouse table, Windsor.ai can write the same data to Google Sheets, BigQuery and other destinations on a schedule you set. Scheduled refreshes skip the 6-hour cache.

GA4 also has its own free export of raw events to BigQuery, set up under Admin, then BigQuery links. Claude can read that dataset through Google’s BigQuery connector in Claude’s directory, with SQL instead of report fields.

Analyze GA4 next to Search Console and Google Ads

With Windsor.ai, the same connector carries the other sources, so one prompt can use both:

  • GA4 and Search Console: “Compare Search Console clicks per page with GA4 Google organic sessions per landing page for the last 28 full days, matching trailing slashes and hostnames.” GA4 landing paths have no trailing slash; Search Console URLs do.
  • GA4 and Google Ads: “Compare Google Ads clicks and conversions with GA4 sessions and key events per campaign for the last 28 full days.” Check first whether the Ads conversions and the GA4 key events are the same actions. When we ran this, the conversion definitions explained most of the gap.

Claude table comparing Search Console clicks with GA4 Google organic sessions per page, page names blurred

Part of Claude’s answer to the Search Console prompt above on windsor.ai, with page names blurred. Most content pages recorded 0.8 to 0.9 GA4 sessions per click.

Conclusion

The Windsor.ai connector is two steps and works in Claude, Claude Desktop and Claude Code. Google’s server suits you if you want Google’s own code for GA4 alone. A CSV is enough for a single question. Whichever you use, ask Claude to show its setup and the session counts behind every rate.

For the product side, see what you can do with GA4 in Claude. For field names, see the GA4 field reference. If your company uses Gemini Enterprise, see how to connect GA4 to Gemini Enterprise.

🚀 Connect GA4 to Claude with Windsor.ai. Free forever plan, no credit card. Try Windsor.ai.

FAQs

Can Claude connect to Google Analytics 4?

Yes. Claude connects to GA4 through MCP: the Windsor.ai connector (no code), or Google’s open-source Analytics MCP server (Claude Code). You can also upload a CSV export for a single question.

Tired of juggling fragmented data? Get started with Windsor.ai today to create a single source of truth

Let us help you automate data integration and AI-driven insights, so you can focus on what matters, growth strategy.
g logo
fb logo
big query data
youtube logo
power logo
looker logo