How to connect Claude to Google Analytics (GA4): step by step with use cases


Most marketers who use Claude still export GA4 reports and paste them into the chat. Each new question means another export, and the pasted numbers are out of date by the next day.
To connect Claude to Google Analytics, you can use MCP (Model Context Protocol). MCP is an open standard that gives an AI assistant controlled access to a data source, so Claude can read your GA4 data and answer questions in chat.
This guide covers the connection methods, a setup walkthrough, example prompts, and fixes for common problems.
Once Claude can read your GA4 property, you can ask questions in plain language and get answers from current data. The Google Analytics MCP server page gives sample questions such as how many users visited yesterday and which products sold best.
A connected Claude handles four marketing jobs well:
The connection handles the data collection, but you still decide what the numbers mean. That judgment is the core of marketing intelligence, and it is where your time goes once the exports stop.
Before you start, check your GA4 access, your Claude plan, and, for technical methods, your Google Cloud setup. Every method reads only the Google Analytics 4 properties your Google account can access.
| Requirement | Why it matters | Needed for |
|---|---|---|
| GA4 access with at least the Viewer role | Claude can only read properties your Google account can see | All methods |
| A Claude plan with connectors | Connectors are included on every Claude plan, Free included | Methods 1, 2, and 3 |
| Claude Desktop or Claude Code | Google’s server runs on your own computer | Method 1 |
| A Google Cloud project with the Google Analytics Admin API and Data API turned on | Google’s server and custom builds call these APIs | Methods 1 and 3 |
| Python 3.10 or higher, plus pipx or uv | Google’s server is a Python package | Method 1 |
| A Reporting Ninja owner or admin login | Only account owners and admins can connect an AI assistant | Method 2 |
There are four ways to connect Claude to GA4. They each have different setup effort, cost, and Claude visibility into GA4 and other marketing channels.
| # | Method | Best for | No-code? | GA4 only or cross-channel | Cost | Setup effort |
|---|---|---|---|---|---|---|
| 1 | Official Google Analytics MCP server | Analysts and developers who use Google Cloud | No | GA4 only | Free to install from GitHub | High |
| 2 | No-code MCP connector (Reporting Ninja) | Marketers and agencies | Yes | Cross-channel | Included in plans from $20 a month, billed annually | Low |
| 3 | API or Claude Code | Teams with a developer | No | Whatever you build | Developer time, plus a paid Claude plan for Claude Code | High |
| 4 | Export to Sheets or Looker Studio, then upload | One-off questions | Yes | Whatever you export | Free | Low each time, repeated for every question |
Google publishes its own Google Analytics MCP server, with the code on GitHub. It is read-only, so it can’t create, change, or delete anything in your GA4 configuration, according to Google.
The server can list your accounts and properties, read custom dimensions and metrics, and run standard, realtime, funnel, and conversions reports. That range covers most GA4 questions a marketer asks.
To set it up, install Python 3.10 or higher, then turn on the Admin API and Data API in a Google Cloud project. After that, you sign in with the read-only Analytics scope through the gcloud tool, and you add the server to Claude Desktop’s config file or register it in Claude Code.
Strengths: It comes from Google, costs nothing to install, and supports funnel and realtime reports.
Limitations: It covers GA4 only, runs on your own computer, and needs technical setup and credential upkeep.
Choose this if you are comfortable with the command line and only need GA4 data in Claude.
A no-code connector is a hosted service that handles the GA4 connection for you. Reporting Ninja is a marketing reporting platform with an AI connector (MCP), with no affiliation to Google or Anthropic.
To set it up for free, you can sign up for a free 15-day trial of Reporting Ninja (no credit card required).
After you’ve signed up, connect GA4 once in Reporting Ninja, then add the connector to Claude and sign in. Claude can then read GA4 alongside your other Reporting Ninja integrations, such as Google Ads, Meta Ads, and Search Console, and more, in one chat.
The same connector works with ChatGPT and other MCP clients.

Strengths: It needs no code, works on every Claude plan including Free, covers many channels, and is read-only by default.
Limitations: It needs a Reporting Ninja subscription after the 15-day free trial, and each plan sets a limit on how many accounts you connect per data source.
Choose this if you are a marketer or agency that wants GA4 next to your ad and social data without technical setup.
Developers can write their own code against the Google Analytics Data API, or ask Claude Code to write and run the scripts. Claude Code can also register MCP servers, including Google’s, with one terminal command.
A reporting platform’s API is another route. Reporting Ninja’s REST API returns data from GA4 and your other connected sources with one key, so a script doesn’t need a separate login for each platform.

Strengths: You control every query and can build custom workflows.
Limitations: It takes developer time, and you have to manage API quotas and keep the code working as the APIs change.
Choose this if you have a developer and need automation that goes beyond questions in chat.
The manual route is to export a GA4 report as a CSV file, or pull it into Google Sheets or Looker Studio, and then upload the file to Claude. Google offers a Report Builder add-on for Sheets, and our Data Studio connectors also pull GA4 numbers into Looker Studio.

Strengths: It doesn’t need any setup and costs nothing.
Limitations: You repeat the export for every new question, and Claude only sees the snapshot you uploaded.
Choose this if you have one question and don’t plan to ask another one soon.
These steps use Reporting Ninja’s connector as the example, but other no-code connectors follow a similar process.
Sign in to Reporting Ninja and add Google Analytics 4 as a data source. When asked, sign in with the Google account that can see your property.
You only connect GA4 once, and afterwards, every report, dashboard, and assistant uses that connection. If you want Claude to compare site results with ad spend, connect your ad accounts at the same time.
Only an account owner or admin can connect an AI assistant to Reporting Ninja. The connector is included in every plan and starts read-only, so Claude can query and analyze your data but can’t edit anything.
To let Claude build reports too, the account owner turns on write access in the AI connector (MCP) tab. Claude then creates ordinary reports in our report builder, which turns a chat request into automated marketing reports.

Claude asks for your confirmation before anything is deleted, scheduled, or shared with a client. The write access never extends to GA4 itself, so your Google Analytics settings stay untouched.
In Claude, open Reporting Ninja in the connector directory and click Connect. Sign in with your Reporting Ninja email and password as the account owner or an admin.
You can also add a custom connector with the URL https://mcp.reportingninja.com/mcp. On Claude Team and Enterprise plans, an organization owner enables the connector for everyone first.
In Claude Code, run claude mcp add --transport http reporting-ninja https://mcp.reportingninja.com/mcp, then type /mcp to sign in.

Open a new chat in Claude, click + > Connectors, and turn on Reporting Ninja. Start with a question you can verify the answer to, such as “List my connected Google Analytics 4 properties” or “How many sessions did [property] get last month?”
Compare the answer with the same report in GA4. If the numbers match, you can trust Claude’s answers and move on to comparisons and summaries, such as GA4 key events next to Google Ads and Meta Ads spend. Our cross-platform reporting widgets also show you this side-by-side view.

Try it on one client first. Connect their GA4 property, add the connector to Claude, and ask your first question. Start your free 15-day trial.
Paste these prompts into Claude once it is connected to GA4. Replace the text in square brackets with your property, dates, and goals.
Summarize last month's GA4 traffic compared with the month before, and flag anything unusual. Name the metrics and date ranges you used.Which 10 landing pages lost the most sessions this month compared with last month? Show the change for each page as a number and a percentage.Which channels drove the most key events last quarter, and what was the key event rate for each channel?Show the funnel from [step 1] to [step 2] to [purchase] for the last 30 days, and tell me where most users drop off.Which blog posts had the highest average engagement time last month, among pages with at least [100] sessions?Which pages brought the most new users from organic search this quarter?Compare sessions and key events by default channel group for this year against the same period last year.Which source and medium combinations brought the most engaged sessions this month, and which ones fell compared with last month?Draft a five-bullet executive summary of this month's website performance for [audience]. End with one recommended next step, and name the metric behind each bullet.Write two sentences that explain the biggest traffic change this month to a client who isn't technical.Most connection problems come from issues around access, credentials, or the way GA4 processes data, and each one has a direct fix. The fixes for Method 1 come from Google’s troubleshooting list.
| Issue | Why it happens | Fix |
|---|---|---|
| Claude sees no properties | The connected Google account has no access to the property | Give the account at least the Viewer role, then reconnect |
| 403 PERMISSION_DENIED or ACCESS_NOT_CONFIGURED (Method 1) | The APIs are off, or there is no quota project | Turn on the Admin API and Data API, and set your Google Cloud project ID |
| The server doesn’t appear in Claude Desktop (Method 1) | The app can’t find pipx or uvx, or it wasn’t fully restarted | Use the full path to pipx or uvx, then quit and reopen the app |
| 401 or expired credentials | Your sign-in has expired | Sign in again with gcloud, or reconnect the connector |
| Numbers don’t match the GA4 interface | Sampling, thresholding, or a different date range, dimension, or filter | Use the same date range, dimensions, and filters as the GA4 report |
| 429 errors | The Data API quota for the property has run out | Use shorter date ranges and fewer dimensions, then wait for the quota to reset |
| Answers that look right but aren’t | Claude misreads a field or a date range | Check key figures in GA4 before you use them |
Small differences from the GA4 interface are normal. Google’s reporting data expectations page explains that the Data API can return sampled data and may hide rows with very few users. Very recent data can also change while GA4 finishes processing it.
Local servers bring their own setup problems. Currently, MCP servers only load on cold start, so you have to quit Claude Desktop fully after you change its config.
You can avoid this step with hosted connectors, since Claude reaches them over the web. Automated reporting software removes the overhead of maintaining connections and also eliminates the manual marketing data integration work of merging GA4 with your other sources.
{{cta-block-v1}}
GA4 shows what visitors do on your site. The spend and campaigns that brought them are recorded in your ad and email platforms, so most performance questions need data from both.
To access that, all you need to do is to connect GA4 and your other channels once in Reporting Ninja, add our MCP connector to Claude, and ask about performance across every channel. Every figure comes from each platform’s API, and all our pricing plans include the connector, from $20 a month, billed annually.
Connect your first GA4 property this week and ask Claude what changed last month. Try Reporting Ninja for free.
A Google Analytics MCP server is a program that lets an AI assistant run GA4 reports through MCP. Google publishes an official read-only server, and reporting platforms offer hosted connectors that cover GA4 and other channels.
Sometimes. Google’s official server is free to install and runs with Claude Desktop, which is available on Claude’s Free plan. Reporting Ninja’s connector is included in plans from $20 a month, billed annually, with a 15-day free trial.
No, not with a no-code connector. Google’s official server is different, because it needs the command line, a Google Cloud project, and a config file.
Yes, with the right setup. Give the connected account the Viewer role, use read-only connections, connect trusted tools only, and keep personal data out of your chats.
Sign up for a 15 days free trial. No credit card required.
