Google Analytics 4

Query your GA4 property data — sessions, users, conversions, traffic sources, events, and more — directly through Claude Code.

Overview

The Google Analytics 4 (GA4) integration lets you query your website and app analytics data directly from Claude Code. Instead of navigating the GA4 interface, building custom explorations, or exporting CSV files, you can ask questions in natural language and get instant answers about your traffic, user behavior, conversions, and more.

Presso connects to the GA4 Data API and Realtime API, giving you access to the same data available in the GA4 reporting interface -- sessions, users, pageviews, events, conversions, e-commerce transactions, traffic sources, and audience segments.

Setup

Prerequisites

  • A Google Analytics 4 property with data collection active
  • Google account access with at least Viewer permissions on the GA4 property
  • A Presso account connected to Claude Code (see MCP Connection)

Connecting your GA4 property

  1. Sign in to Presso and navigate to the Integrations page.
  2. Click Connect next to Google Analytics 4.
  3. You will be redirected to Google's OAuth consent screen. Sign in with the Google account that has access to your GA4 property and grant the requested permissions.
  4. Select the GA4 property you want to connect.
  5. Once authorized, you will be redirected back to Presso. Your GA4 property is now connected.
  6. In Claude Code, verify the connection by asking:
Show me a summary of my GA4 traffic for the last 7 days.

Available data

Presso exposes your GA4 data through tools that map to the GA4 Data API's reporting capabilities. You can query any combination of dimensions and metrics supported by GA4.

Core tools

ToolDescription
ga4_run_reportRun a standard report with dimensions, metrics, date ranges, and filters
ga4_run_realtime_reportQuery real-time data (active users, current events)
ga4_get_metadataRetrieve available dimensions and metrics for your property
ga4_run_funnel_reportAnalyze user funnels with step-by-step drop-off
ga4_list_propertiesList GA4 properties accessible with your connected account

Dimensions and metrics

GA4 organizes data into dimensions (attributes that describe your data) and metrics (quantitative measurements). You can combine them in any report.

Commonly used dimensions

DimensionDescription
dateThe date of the event (YYYYMMDD)
sessionSourceThe traffic source (google, facebook, direct, etc.)
sessionMediumThe traffic medium (organic, cpc, email, referral, etc.)
sessionCampaignNameThe campaign name
countryUser's country
cityUser's city
deviceCategorydesktop, mobile, or tablet
browserUser's browser (Chrome, Safari, etc.)
operatingSystemUser's OS (Android, iOS, Windows, etc.)
pagePathThe URL path of the page
pageTitleThe title of the page
landingPageThe first page of the session
eventNameThe name of the tracked event
firstUserSourceThe source that first acquired the user
sessionDefaultChannelGroupThe default channel grouping (Organic Search, Paid Search, Social, etc.)
newVsReturningWhether the user is new or returning

Commonly used metrics

MetricDescription
sessionsTotal number of sessions
totalUsersTotal number of users
newUsersNumber of first-time users
activeUsersUsers who had an engaged session
screenPageViewsTotal pageviews
screenPageViewsPerSessionAverage pages per session
averageSessionDurationAverage session length in seconds
bounceRatePercentage of single-page sessions
engagementRatePercentage of engaged sessions
engagedSessionsSessions lasting over 10 seconds or with conversions/multiple pageviews
eventCountTotal number of events
conversionsTotal number of conversion events
totalRevenueTotal revenue (e-commerce + in-app + ad revenue)
ecommercePurchasesNumber of purchase events
purchaseRevenueRevenue from purchases
transactionsPerPurchaserAverage transactions per purchasing user
userConversionRatePercentage of users who triggered a conversion event
sessionConversionRatePercentage of sessions with a conversion event

For the complete list of available dimensions and metrics, you can ask Claude Code:

What dimensions and metrics are available in my GA4 property?

Date range queries

All GA4 reports require a date range. You can specify dates naturally, and Claude Code will translate them to the correct format.

Supported date formats:

Natural languageInterpreted as
"last 7 days"Past 7 days from today
"last 30 days"Past 30 days from today
"this month"Start of current month to today
"last month"Full previous calendar month
"this quarter"Start of current quarter to today
"January 2026"2026-01-01 to 2026-01-31
"2025-11-01 to 2025-12-31"Exact date range
"year to date"January 1 of current year to today

Comparison ranges:

You can also compare two time periods:

Compare traffic for this month vs. last month.
Show me sessions last week compared to the same week last year.

Example queries

Traffic analysis

Show me traffic sources for the last 30 days, broken down by channel group.
What are my top 10 landing pages by sessions this month?
How much traffic am I getting from organic search vs. paid search?

User behavior

What's the average session duration and bounce rate for mobile vs. desktop users?
Show me the top events triggered on my site in the last 7 days.
Which pages have the highest engagement rate?

Conversions and revenue

What's our overall conversion rate for the past 30 days?
Show me revenue by traffic source for this month.
How many purchases came from email campaigns this quarter?
What's our e-commerce conversion funnel? Show me drop-off from product view to purchase.

Audience analysis

Break down users by country for the last 30 days. Show me the top 15 countries.
What percentage of our traffic comes from mobile devices?
Compare new vs. returning users over the last 90 days, grouped by week.

Content performance

Which blog posts got the most pageviews this month?
Show me pages with the highest bounce rate -- are there any problem pages?
What are the top exit pages on the site?

Segment analysis

You can filter reports by specific user or session characteristics to analyze segments of your data.

Example segment queries:

Show me conversion rates for users who came from Google Ads only.
What's the average order value for mobile users vs. desktop users?
Compare engagement metrics for users in the US vs. users in the UK.
Show me the behavior of users who arrived through email campaigns --
how many pages do they visit, and what's their conversion rate?

Segments can be defined by any combination of dimensions: traffic source, device, geography, user type, or any custom dimension you have configured in GA4.

Real-time data

Presso supports GA4's real-time reporting, letting you see what is happening on your site right now.

Example real-time queries:

How many users are on my site right now?
What pages are people viewing right now?
Which countries are my current active users coming from?
Are there any active users from today's email campaign?

Real-time data covers approximately the last 30 minutes of activity and is useful for monitoring launches, campaigns, and live events.

Common report types

Here are some of the most frequently requested reports and how to ask for them.

Acquisition report

Show me a full acquisition report for the last 30 days: sessions, users,
new users, bounce rate, and conversions -- broken down by source/medium.

Engagement report

Generate an engagement report: average session duration, pages per session,
engagement rate, and event count -- broken down by device category.

E-commerce report

Show me an e-commerce overview for this month: total revenue, transactions,
average order value, and conversion rate. Break it down by traffic source.

Landing page report

List the top 20 landing pages by sessions for the past 30 days.
Include bounce rate, average session duration, and conversions for each.

Geographic report

Break down traffic and conversions by country for the last quarter.
Show me the top 20 countries.

Technology report

What browsers and devices are my users on? Show sessions, bounce rate,
and conversion rate by browser and device category for the last 30 days.

Combining with other integrations

One of Presso's most powerful features is cross-platform analysis. You can combine GA4 data with other connected integrations:

Compare GA4 traffic data with Shopify order data --
which traffic sources are actually driving purchases?
Show me Google Ads spend and GA4 conversion data side by side.
What's the true cost per conversion?
Compare GA4 sessions from Meta Ads campaigns with the campaign performance
reported in Meta Ads Manager. Are there discrepancies?

Limitations and notes

  • Read-only access -- Presso provides read-only access to your GA4 data. You cannot modify property settings, create events, or change configurations through Presso.
  • Data processing latency -- Standard GA4 reports may have a processing delay of 24-48 hours. Real-time reports show data from the last 30 minutes.
  • Sampling -- For large datasets, GA4 may return sampled data. Presso will indicate when sampling is applied.
  • Quotas -- The GA4 Data API has daily request quotas. Normal usage is well within these limits, but very intensive analysis sessions may approach them.
  • Custom dimensions and metrics -- If you have configured custom dimensions or metrics in GA4, they are accessible through Presso. Ask Claude Code to list available dimensions to see your custom ones.
  • Property scope -- Each Presso connection is linked to a single GA4 property. If you have multiple properties, connect each one separately or specify which property to query.
  • Date range limits -- GA4 retains data based on your property's data retention settings (default is 14 months for event-level data). Reports using standard aggregated data can access historical data beyond this window.
  • Attribution models -- GA4 uses data-driven attribution by default. Reports from Presso reflect the same attribution model configured in your GA4 property.