# GA4 Analytics MCP

> Google Analytics MCP lets your AI client analyze web and app user behavior in natural conversation. Run custom reports, check real-time traffic streams, visualize funnel drop-offs, or export audience lists—all without touching the GA4 dashboard. It brings deep analytics power directly into your agent workflow.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** web-analytics, user-behavior, conversion-tracking, real-time-data, funnel-analysis, audience-insights

## Description

Stop juggling tabs just to pull a report. This MCP connects your AI client directly to Google Analytics 4 (GA4) data. Instead of navigating complex dashboards, you simply ask your agent what you need—whether it's monitoring current site traffic or deep-diving into conversion rates from months ago. You can run reports using custom metrics and dimensions like active users, sessions, or event counts, narrowing results by country or device type. Need to know why signups are stalling? Run a funnel analysis right away. Want to see exactly what specific user IDs did? Retrieve their full activity history. This capability lets your AI act as an analyst dedicated solely to your web data. Because Vinkius hosts this MCP, you get immediate access to all these advanced tools within the same single connection point.

## Tools

### batch_run_reports
Runs multiple predefined reports in one API call for fast dashboard loading or comparative analysis.

### check_compatibility
Checks if you can combine selected metrics and dimensions into a report, preventing errors before running the query.

### get_audience_export
Checks the status of an existing job that is exporting a specific user list segment.

### get_metadata
Lists all available metrics and dimensions for your property, helping you discover what data points are even measurable.

### get_property
Retrieves detailed configuration information about a specific GA4 property ID.

### get_user_activity
Gathers all interaction history for one user, including pageviews and events, useful for deep journey mapping.

### list_accounts
Shows every Google Analytics account you have access to, allowing you to pick the correct parent property.

### list_audience_exports
Lists all scheduled user list export jobs and their current status (e.g., CREATING or FAILED).

### list_properties
Finds all individual websites, apps, or measurement streams that have unique IDs for reporting.

### run_funnel_report
Analyzes the conversion path by showing where users drop off through defined steps in a process.

### run_realtime_report
Gathers live data on user activity, metrics, and sources happening right now (last 30–60 minutes).

### run_report
Runs a general custom report using specified metrics, dimensions, date ranges, and optional filters.

## Prompt Examples

**Prompt:** 
```
Show me the number of active users and pageviews by country for the last 7 days for property 123456789.
```

**Response:** 
```
I've run the report for the last 7 days. Top countries by active users: United States — 45,230 active users, 189,450 pageviews; United Kingdom — 12,890 active users, 52,340 pageviews; Germany — 8,560 active users, 34,120 pageviews; Brazil — 6,780 active users, 28,900 pageviews; India — 5,420 active users, 21,560 pageviews. Total: 156,420 active users across 645,890 pageviews. Would you like a breakdown by device category or traffic source?
```

**Prompt:** 
```
What's happening on the site right now? Show me realtime users by traffic source.
```

**Response:** 
```
Realtime data (last 30 minutes): 847 active users right now. Top traffic sources: Organic Search — 412 users; Direct — 198 users; Social — 124 users; Paid Search — 78 users; Email — 35 users. Top pages being viewed: Homepage (/) — 234 users; Product page (/products/xyz) — 156 users; Checkout (/checkout) — 89 users. Engagement rate is 68% with average session duration of 2m 34s.
```

**Prompt:** 
```
Run a funnel analysis for our checkout flow: step 1 = viewed product, step 2 = added to cart, step 3 = started checkout, step 4 = completed purchase. Show me where users drop off.
```

**Response:** 
```
I've analyzed your checkout funnel. Here's the conversion flow:

1. **Viewed Product** — 12,450 users entered
2. **Added to Cart** — 4,980 users (40.0% conversion from step 1)
3. **Started Checkout** — 2,340 users (47.0% conversion from step 2)
4. **Completed Purchase** — 1,560 users (66.7% conversion from step 3)

**Overall funnel conversion rate: 12.5%** (1,560 out of 12,450)

**Biggest drop-off**: Between 'Viewed Product' and 'Added to Cart' — 60% of users leave here. This suggests product pages may need clearer CTAs, better pricing visibility, or faster load times.
```

## Capabilities

### View real-time site traffic
Monitors active users, events, and sources happening on your website or app in the last 30–60 minutes.

### Map user conversion paths
Analyzes where people drop off during critical flows like checkout or signup processes.

### Run custom data reports
Generates detailed historical reports using specific combinations of metrics and dimensions you define.

### Extract user lists for marketing
Creates and monitors jobs to export user segments based on defined audience criteria.

### Investigate single users
Retrieves a complete event history for a specific user ID, useful for support tickets or QA testing.

## Use Cases

### Pinpointing Checkout Failure Points
A Product Manager asks their agent: 'Run a funnel analysis on the checkout flow.' The MCP responds by showing that 60% of users drop off between viewing the product and adding it to the cart, pointing directly to poor visibility of shipping costs.

### Real-Time Incident Response
A Support Engineer notices a dip in traffic. They ask their agent: 'What's happening on the site right now?' The MCP provides an immediate view of live user counts and top sources, allowing them to confirm if a regional outage is occurring.

### Optimizing Marketing Campaigns
A Marketing Analyst needs to retarget users who visited but didn't sign up. They ask their agent to list and monitor the audience export job for 'visited homepage last 7 days,' getting a clean, actionable list ID.

### Historical Deep Dives
A Data Analyst needs comparative data across several quarters. Instead of running three separate reports, they use batch_run_reports to execute all necessary metrics and dimensions in one call, saving hours of API work.

## Benefits

- Stop guessing. Use run_funnel_report to immediately identify conversion bottlenecks, showing exactly where users quit signing up or buying.
- Save time on data gathering. Instead of running multiple reports manually, use batch_run_reports to pull comprehensive metrics and dimensions in a single request.
- Stay current with live traffic using run_realtime_report. Monitor active users and event counts as they happen—critical for launch day monitoring or immediate troubleshooting.
- Target specific groups easily. Use list_audience_exports and get_audience_export to create user segments (e.g., 'abandoned cart in 30 days') for retargeting lists.
- Speed up support tickets. The get_user_activity tool lets you retrieve a complete timeline of events for any customer ID, giving agents instant context.

## How It Works

The bottom line is you get immediate, actionable insights into your user behavior without writing complex API queries or leaving your primary workflow.

1. Subscribe to this MCP and provide your Google Analytics API key.
2. Direct your AI client to perform an action, such as 'Show me all users who viewed product X last week.'
3. The agent calls the necessary tool, retrieves the data, and presents a plain-language summary of the insights.

## Frequently Asked Questions

**How do I get a list of all my available metrics using Google Analytics MCP?**
Use get_metadata. This tool lists every standard and custom metric and dimension for your property, letting you see exactly what data points are measurable before building any reports.

**Can I check if my chosen report metrics work together with Google Analytics MCP?**
Yes, use check_compatibility. You provide the properties ID and the list of metrics/dimensions you plan to use, and this tool validates them upfront, saving you from API errors.

**What is the best way to analyze a user's journey with Google Analytics MCP?**
Use get_user_activity. This retrieves all interactions (pageviews, events) for a specific user ID, allowing deep investigation into how that customer used your site.

**How do I see what is happening on my website right now?**
Run the realtime report using run_realtime_report. This tool gathers live data—active users, event counts, and top sources—from the last 30 to 60 minutes.

**Does Google Analytics MCP help me export user lists?**
Yes, you use list_audience_exports first. This shows all your scheduled audience job statuses (CREATING, ACTIVE, FAILED), and then get_audience_export to monitor a specific job's completion.