Google Analytics Claude Connector: Connect GA4 to Claude
Google Analytics 4 is full of useful data, sessions, traffic sources, conversions, user behaviour, but getting answers out of it usually means clicking through reports, building explorations, and comparing date ranges manually. It's slow, and the interface fights you at every step.
There's a better way. Add a Google Analytics connector to Claude (or ChatGPT, Gemini or Perplexity) and just ask questions in plain English. No report building, no segments, no exports. This guide covers the two ways to do it, Google's own GA4 MCP server and a hosted connector, and walks through setting up the hosted one in about 5 minutes.
Why connect GA4 to AI?
GA4's built-in reports answer pre-defined questions. AI answers your questions. The difference matters when you're trying to understand what's actually happening on your site.
More importantly, GA4 data becomes dramatically more useful when you can cross-reference it with other sources. If you also have Shopify connected, you can ask things like:
- "My traffic from Google Ads is up 40% but Shopify revenue is flat, what's going on?"
- "Which traffic sources have the best conversion rate to actual purchases?"
- "Compare my email campaign traffic from Klaviyo to my organic search traffic, which drives more revenue per session?"
These questions are nearly impossible to answer inside GA4 alone. With AI and a connector, they take seconds.
Two ways to connect Google Analytics to Claude
Google's official Google Analytics MCP server. Google publishes an open-source Google Analytics MCP server. It is free and read-only, and Google labels it experimental. It runs on your own computer: you install it with pipx, then set up Google Cloud Application Default Credentials with the analytics.readonly scope, and add it to Claude Desktop, Claude Code or Gemini CLI. It is a good option if you are comfortable with the command line and only need GA4.
A hosted Google Analytics Claude connector (Ask AI). Ask AI runs the server for you. You sign in with Google, copy one URL into Claude, and you are done: nothing to install, no Google Cloud project, and it works in Claude on the web, ChatGPT and Perplexity as well as Claude Desktop. It is also read-only, and because Ask AI connects your other tools too, your GA4 traffic sits next to your Shopify orders, Klaviyo campaigns and ad spend in the same conversation.
The rest of this guide sets up the hosted connector. See the Google Analytics MCP server page for a closer look at what it can query.
What GA4 data gets synced
Once you connect Google Analytics through Ask AI Data Connector, your AI tool has access to:
- Sessions and users, total sessions, active users, new vs returning visitors
- Traffic sources, organic search, paid, direct, referral, social, email, broken down by source and medium
- Page performance, top pages by views, average engagement time, bounce rate
- Conversions and events, key events, conversion counts, goal completions
- User behaviour, session duration, pages per session, engagement rate
- Geographic data, sessions and users by country and region
- Device breakdown, desktop, mobile, and tablet splits
This covers the data most teams actually need from GA4 day-to-day.
How to connect GA4 to AI
The whole process takes about 5 minutes.
Step 1: Sign up for Ask AI Data Connector
Go to ask-ai-data-connector.com/signup and create a free account. No credit card required, you get a 7-day free trial.
Step 2: Connect Google Analytics
From your dashboard, go to Data Sources and click Google Analytics. You'll be redirected to Google's OAuth flow:
- Sign in with the Google account that has access to your GA4 property
- Grant read-only access to your Analytics data
- Select the GA4 property you want to connect
- Click Sync now to pull your data
The sync takes about 30 seconds. No API keys to create, no manual configuration, OAuth handles everything.
Step 3: Get your MCP URL
Go to AI Tools in your dashboard. Your unique Remote MCP Server URL is ready straight away, with no configuration.
Step 4: Add the connector to Claude
- Claude, open Settings, then Connectors, then Add Custom Connector, and paste your URL. This works in Claude on the web and in Claude Desktop, and takes under 2 minutes.
- ChatGPT, create a Custom GPT with the OpenAPI spec and API key (requires Plus or Team plan).
- Gemini, connect via function calling and the REST API.
- Perplexity, connect via MCP (Pro plan required).
Detailed setup instructions for each tool are in your AI Tools dashboard.
Example queries
Once connected, try asking:
"What were my top 10 landing pages by sessions this month?"
"How does my organic search traffic compare to paid this quarter? Show me the trend."
"What's my bounce rate on mobile vs desktop?"
"Which traffic sources have the highest engagement rate?"
"Show me a week-over-week breakdown of sessions for the last 4 weeks."
"What percentage of my traffic comes from social media, and which platforms drive the most?"
"My traffic dropped last Tuesday, which sources declined?"
The AI queries your actual GA4 data and returns real numbers. No guessing, no generic advice.
The power of combining GA4 with other data sources
GA4 tells you what's happening on your site. Shopify tells you what's happening with revenue. Klaviyo tells you what's happening with email. Xero tells you what's happening with your finances. Individually, each source gives you a partial picture. Together, they give you the full story.
With multiple sources connected, you can ask:
"My Shopify revenue is up 20% this month. Is that because traffic increased or because conversion rate improved? Cross-reference GA4 sessions with Shopify orders."
"Which Klaviyo campaigns drove the most engaged traffic? Show me sessions and average engagement time from email traffic."
"Compare my customer acquisition cost from Google Ads traffic to the actual revenue those customers generated in Shopify."
This is the kind of analysis that normally requires exporting data from three different platforms into a spreadsheet. With AI, it's one question.
Multi-property support
If you manage multiple websites or brands, you can connect more than one GA4 property to your account. Each property syncs independently, and your AI tool can query across all of them. Useful for agencies, portfolio brands, or anyone running multiple storefronts.
FAQ
Is there an official Google Analytics connector for Claude?
Google publishes an open-source, experimental Google Analytics MCP server. It runs on your own computer, installs with pipx, needs Google Cloud Application Default Credentials, and works with Claude Desktop, Claude Code and Gemini CLI. Hosted connectors such as Ask AI need no installation.
How do I add a Google Analytics connector to Claude?
With Ask AI, connect GA4 through Google sign-in, copy your MCP URL from the AI Tools page, then in Claude open Settings, Connectors, Add Custom Connector and paste the URL.
Does the Google Analytics Claude connector work in Claude on the web?
A hosted connector like Ask AI does, because it is a remote MCP server. Google's official GA4 MCP server runs locally, so it is used with Claude Desktop or Claude Code.
Can the connector change my Google Analytics settings?
No. Ask AI connects with read-only access to GA4, as does Google's official server, so neither can change your property or data.
Get started
Connect your GA4 data to AI in about 5 minutes: Sign up here, connect Google Analytics via OAuth, pick your AI tool, and start asking questions about your traffic.
Not ready to sign up? Try the live demo first, no account needed.
Related guides
Connect the tools in this guide
See how Ask AI pulls each source into Claude, ChatGPT, or Gemini.