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
- Sign in to Presso and navigate to the Integrations page.
- Click Connect next to Google Analytics 4.
- 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.
- Select the GA4 property you want to connect.
- Once authorized, you will be redirected back to Presso. Your GA4 property is now connected.
- 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
| Tool | Description |
|---|---|
ga4_run_report | Run a standard report with dimensions, metrics, date ranges, and filters |
ga4_run_realtime_report | Query real-time data (active users, current events) |
ga4_get_metadata | Retrieve available dimensions and metrics for your property |
ga4_run_funnel_report | Analyze user funnels with step-by-step drop-off |
ga4_list_properties | List 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
| Dimension | Description |
|---|---|
date | The date of the event (YYYYMMDD) |
sessionSource | The traffic source (google, facebook, direct, etc.) |
sessionMedium | The traffic medium (organic, cpc, email, referral, etc.) |
sessionCampaignName | The campaign name |
country | User's country |
city | User's city |
deviceCategory | desktop, mobile, or tablet |
browser | User's browser (Chrome, Safari, etc.) |
operatingSystem | User's OS (Android, iOS, Windows, etc.) |
pagePath | The URL path of the page |
pageTitle | The title of the page |
landingPage | The first page of the session |
eventName | The name of the tracked event |
firstUserSource | The source that first acquired the user |
sessionDefaultChannelGroup | The default channel grouping (Organic Search, Paid Search, Social, etc.) |
newVsReturning | Whether the user is new or returning |
Commonly used metrics
| Metric | Description |
|---|---|
sessions | Total number of sessions |
totalUsers | Total number of users |
newUsers | Number of first-time users |
activeUsers | Users who had an engaged session |
screenPageViews | Total pageviews |
screenPageViewsPerSession | Average pages per session |
averageSessionDuration | Average session length in seconds |
bounceRate | Percentage of single-page sessions |
engagementRate | Percentage of engaged sessions |
engagedSessions | Sessions lasting over 10 seconds or with conversions/multiple pageviews |
eventCount | Total number of events |
conversions | Total number of conversion events |
totalRevenue | Total revenue (e-commerce + in-app + ad revenue) |
ecommercePurchases | Number of purchase events |
purchaseRevenue | Revenue from purchases |
transactionsPerPurchaser | Average transactions per purchasing user |
userConversionRate | Percentage of users who triggered a conversion event |
sessionConversionRate | Percentage 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 language | Interpreted 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.