Free planRead every connected account, 100 reads a day, free forever.See pricing →

AI connectors

Connecting GA4 to Claude or ChatGPT

Four ways to connect Google Analytics 4 to Claude or ChatGPT (CSV exports, Google's GA4 MCP server, a hosted MCP connector, BigQuery), their trade-offs, setup steps and the GA4 data quirks to watch for.

The short answer

You can give Claude or ChatGPT access to GA4 four ways: paste exports, run Google's open-source GA4 MCP server locally, add a hosted MCP connector with a browser sign-in, or query a BigQuery export. For most marketers a hosted connector is the quickest and works for the whole team; analysts who want full control often prefer the local server or BigQuery. Whichever you choose, remember GA4's processing delay, thresholds and key event definitions.

The four options at a glance

OptionSetupLive dataTeam-friendlyCan change settings
Export and paste (CSV)NoneNo, a snapshotYes, but manualNo
Google's GA4 MCP serverLocal install, Google Cloud credentialsYesEach person installs itNo (read-only)
Hosted MCP connector (e.g. MegaMCP)Paste a URL, sign in with GoogleYesYes, one URL for everyoneYes, through approved plans
BigQuery export + a BigQuery toolGA4 BigQuery link, SQLDaily or streaming exportFor analystsNo

Option 1: export and paste

Download a report or exploration as CSV and upload it to the chat. It works today with no setup, and it's fine for a one-off question.

The limits show up quickly: you have to know which report to export before asking the question, every follow-up needs another export, and the AI can't check anything you didn't include. It's also easy to paste a sampled or thresholded table without realizing it.

Option 2: Google's GA4 MCP server

Google publishes an experimental, open-source MCP server for Google Analytics that uses the GA4 Admin and Data APIs. You run it on your own machine with your own Google Cloud credentials, and it's read-only.

Good fit: an analyst or developer who wants free, official, local access and is comfortable with Google Cloud setup. Less good: a marketing team where several people need it, or anyone using Claude or ChatGPT on the web, which need a remote server rather than a local one. Install from Google Analytics' own GitHub organization; there are several similarly named community projects.

Option 3: a hosted MCP connector

A hosted connector runs the MCP server for you. You add one URL to Claude or ChatGPT, sign in with Google in the browser, choose which properties the AI can see, and ask questions. Every teammate signs in as themselves.

  1. Create a MegaMCP workspace.

    Start a free trial; no credit card is needed.

  2. Connect Google.

    In Connections, sign in with the Google account that has access to your GA4 properties. Switch off any property the AI shouldn't see.

  3. Add MegaMCP to your AI app.

    Paste https://megamcp.com/api/mcp as a custom connector in Claude or a custom app in ChatGPT, then sign in.

  4. Ask a question you know the answer to.

    Compare last week's sessions with the GA4 interface to confirm the property, date range and time zone match.

MegaMCP's GA4 tools cover flexible Data API reports, period comparisons that explain what drove a change, top pages and landing pages by source/medium, funnels, pivot tables, realtime, audience breakdowns, a property setup audit and change history. Admin changes (key events, data retention, enhanced measurement, data streams, custom definitions) are proposals with before and after values that a person approves, and plans that delete a stream or shorten retention say plainly that they can't be undone. See the GA4 integration.

Note. Google Analytics 4 in MegaMCP is marked Rolling out: the tools are built, and connections switch on as the platform finishes approving MegaMCP's app. The sandbox ad account works today, so you can practise the whole loop first.

Claude · MegaMCP connectedIllustrative demo
  1. You

    How did traffic change last week, by channel?

  2. Claude
    ga4_traffic_summaryDonelast 7 days

    Organic led, and paid dipped mid-week. Sessions by channel:

    • Organic4.1k
    • Paid2.9k
    • Direct1.9k
    • Email860
    • Referral520
With a hosted connector, the AI reads GA4 directly instead of a pasted export.

Option 4: BigQuery export

GA4 can export raw event data to BigQuery daily (and streaming, at a cost). An AI with a BigQuery tool can then write SQL over every event, with no sampling or thresholds.

It's the most powerful option and the most work: you need the export set up in advance (it doesn't backfill history), you need to understand the event schema, and queries cost money. MegaMCP's BigQuery integration shows a dry-run byte estimate before you approve any query; it's marked Rolling out.

GA4 quirks that trip up AI answers

  • Processing delay. Google says GA4 data can take 24 to 48 hours to process fully. Yesterday's numbers may still rise. Ask for complete periods ending two days ago when precision matters.
  • Key events, not conversions. Since 2024 GA4 calls conversions “key events”; Google Ads conversions are configured separately. Make sure the AI uses the key event you care about, not every event.
  • Thresholds. When Google signals or small numbers are involved, GA4 may withhold rows to protect privacy, so totals by dimension don't always add up.
  • Time zones and currencies. Reports follow the property's settings. Compare like with like.
  • Attribution differences. GA4 and ad platforms credit conversions differently. Expect GA4 paid conversions to differ from what Google Ads or Meta report.
  • UTM hygiene. Channel reports are only as good as your UTM parameters. Inconsistent casing splits sources.

Good first questions

Start with questions that combine dimensions you'd normally build an exploration for:

  • Reads data

    Why did key events drop last week compared with the week before? Break it down by default channel group and landing page.

    Tools it calls: ga4_compare_periodsga4_landing_pages

  • Reads data

    Which landing pages get over 1,000 sessions a month but convert under 1%?

    Tools it calls: ga4_landing_pages

  • Reads data

    Audit this property's setup: time zone, currency, data retention, enhanced measurement and key events.

    Tools it calls: ga4_property_audit

The GA4 prompt library has 20 more, grouped by reporting, optimization, audits and agency work.

Example prompts

Copy these into Claude, ChatGPT or Cursor with MegaMCP connected. Each lists the tools it typically calls; more are in the prompt library.

  • Reads data

    Give me a weekly GA4 traffic summary I can paste into Slack, compared with the previous week.

    Tools it calls: ga4_traffic_summary

  • Reads data

    How many people are on the site right now, and from which countries?

    Tools it calls: ga4_realtime

  • Reads data

    Run a funnel from product view to add to cart to purchase for the last 30 days.

    Tools it calls: ga4_funnel_report

  • Reads data

    Which settings changed in this GA4 property in the last month, and who changed them?

    Tools it calls: ga4_change_history

  • Proposes a change

    Mark the generate_lead event as a key event and show me the plan.

    Tools it calls: ga4_list_key_eventsga4_create_key_event

    Any change becomes a plan you review and approve. Nothing moves until you do.

FAQ

Can ChatGPT connect to Google Analytics directly?

Through an app (connector) backed by an MCP server, yes. Add a GA4-capable MCP server as a custom app in ChatGPT with developer mode, sign in with Google, and ask questions about your properties.

Is there an official Google Analytics MCP server?

Google publishes an experimental, open-source, read-only GA4 MCP server that you run locally with your own Google Cloud credentials.

Can the AI change my GA4 settings?

Only through write tools, and with MegaMCP only as a plan a person approves. Read-only servers, including Google's, can't change anything.

Why don't the AI's GA4 numbers match the interface?

Usually a different date range, time zone, property, metric definition (sessions vs users, key events vs all events), thresholding, or recent data still processing. Ask the AI which settings it used.

Does connecting GA4 to an AI share my data with the AI company?

The data you ask about is sent to the AI app to answer your question, under that app's data terms. MegaMCP passes report data through without storing it and never trains models on it.

Try it on fake money first. Every MegaMCP workspace comes with a sandbox ad account. No credit card.

Join the waiting list

Spotted something wrong or out of date? Tell us and a human will fix it.

5 days. On the house.

Put Mega to work. Your ad budget stays yours.

No credit card to start. Every workspace comes with a sandbox ad account, so you can watch the whole ask, diff, approve, undo loop before you connect anything real.

Get launch updates

New integrations, platform approvals, the occasional dark joke. One or two emails a month. Unsubscribe anytime.

Want early access? Join the waiting list →