# Google Analytics 4 MCP for AI Agents AI Agent Connect

> Google Analytics 4 lets you query your website and app traffic through your AI client. Instead of digging through complex dashboards, you can ask for specific data points like conversion rates, user demographics, or real-time traffic. It pulls live data directly into your chat, making it easy to spot trends and growth patterns without manually filtering every report.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_UmO7U4NMjZu3BRjA290BLgRmFALC6u5wgBjY3hkU/ai-agent-connect
- **Tags:** web-analytics, event-tracking, conversion-analysis, real-time-data, traffic-attribution, user-behavior

## Description

You spend way too much time clicking through nested menus in the Google Analytics dashboard just to find one specific number. This Connector changes that by letting your AI agent do the heavy lifting. Instead of exporting CSVs or building complex filters, you just tell your agent what you need to know. You can ask about where your traffic is coming from, which pages are actually converting, and what devices your users are holding. It handles the data fetching and puts the results right in front of you. It works by connecting to your property so you can run custom reports, check real-time activity, and see how different regions are interacting with your site. It is a big part of why Vinkius is the go-to spot for getting these kinds of connections running quickly. You get to stay focused on the strategy while the agent handles the data retrieval.

## Tools

### get_page_views
Pull a list of the top 25 pages ranked by views for any date range.

### get_traffic_sources
Identify the session sources and mediums driving your website traffic.

### get_user_demographics
Get a breakdown of your audience by country and geographic region.

### run_pivot_report
Generate pivot reports to see data across multiple dimensions at once.

### run_report
Run a custom report using specific dimensions, metrics, and date ranges.

### batch_run_reports
Execute multiple report requests in a single command to save time.

### check_compatibility
Verify if your chosen dimensions and metrics work together before running a report.

### get_conversions
Retrieve counts and revenue data for your specific conversion events.

### get_device_breakdown
See how many users are on desktop, mobile, or tablet.

### get_metadata
See every dimension and metric available in your property to plan your reports.

### list_audience_exports
See a list of your current audience exports.

### run_realtime_report
Get a snapshot of active users and current page views right now.

## Prompt Examples

**Prompt:** 
```
What were our top 3 traffic sources last week?
```

**Response:** 
```
Here are the top 3 traffic sources for the last 7 days:

| Source / Medium | Sessions | Conversion Rate |
| :--- | :--- | :--- |
| **Google Organic** | 12,400 | 3.2% |
| **Paid Search** | 8,200 | 4.8% |
| **Direct** | 5,100 | 1.1% |

Would you like to see the conversion data for a specific source?
```

**Prompt:** 
```
Are we seeing more mobile or desktop traffic today?
```

**Response:** 
```
Current real-time traffic breakdown:

* **Desktop:** 58.4% (2,410 users)
* **Mobile:** 35.2% (1,450 users)
* **Tablet:** 6.4% (264 users)

Mobile traffic is currently seeing a slight uptick compared to the same time last week.
```

**Prompt:** 
```
How many signups did we get from the blog page yesterday?
```

**Response:** 
```
Yesterday's performance for the blog page:

* **Total Signups:** 42
* **Conversion Rate:** 2.8%
* **Revenue Generated:** $0.00

I can also pull the device breakdown for these signups if you'd like.
```

## Capabilities

### Run custom reports
Query any combination of dimensions and metrics for specific dates.

### Monitor live traffic
Get a pulse on active users and page views as they happen.

### Identify top pages
See which URLs are getting the most hits over any timeframe.

### Track traffic sources
See exactly which channels are sending people to your site.

### Analyze user demographics
Get a breakdown of where your audience lives geographically.

### View conversion data
See how many people are completing your main goals and the revenue they generate.

## Use Cases

### Campaign ROI Check
A marketing manager wants to know if a new LinkedIn campaign is driving sales. They ask the agent to compare traffic sources from the last 7 days.

### Friction Point Identification
A product manager wants to see how many people reached the signup page on mobile. They use the device breakdown to check for friction.

### High-Value Content Discovery
A growth engineer needs to find the top 10 pages with the highest conversion rates. They run a custom report to identify the best content.

### Live Site Monitoring
A site owner wants to see what is happening on the site right now. They ask for a real-time report to check for a potential outage.

## Benefits

- Stop manual filtering by using run_report to get specific data points in seconds.
- See real-time trends immediately with run_realtime_report to catch spikes as they happen.
- Understand your audience better by using get_user_demographics to see where your fans live.
- Identify high-performing content quickly with get_page_views to see what people actually read.
- Track marketing success more accurately using get_traffic_sources to see which ads work.
- Save hours of work by using batch_run_reports to pull multiple data sets in one request.

## How It Works

The bottom line is you get instant answers to complex web analytics questions without ever opening a dashboard.

1. Subscribe to the Connector and provide your Google OAuth Access Token and GA4 Property ID.
2. Connect your AI client to the Connector via the Vinkius catalog.
3. Ask your agent for specific analytics data in plain English.

## Frequently Asked Questions

**Can I use the Google Analytics 4 MCP to see my real-time traffic?**
Yes, you can get a live snapshot of active users and current page views. This allows you to monitor site activity as it happens without refreshing the dashboard.

**Does the Google Analytics 4 MCP work with my custom conversions?**
It can pull conversion counts and revenue data for your specific events. This makes it easy to track how many people are completing your key business goals.

**Can I ask about specific dates with the Google Analytics 4 MCP?**
Yes, you can query any specific date range for your reports. This is perfect for comparing week-over-week performance or looking at historical data.

**Will the Google Analytics 4 MCP show me where my users are coming from?**
It pulls session sources and mediums so you can see your traffic origins clearly. You can identify which channels are driving the most engagement.

**Can the Google Analytics 4 MCP help me see which pages are the most popular?**
It can retrieve the top pages ranked by views for any period. This helps you quickly identify which content is resonating most with your audience.

**Can I run custom reports with specific dimensions and metrics?**
Yes! The `run_report` tool accepts a JSON configuration with dateRanges, dimensions (e.g., pagePath, sessionSource), and metrics (e.g., sessions, screenPageViews, conversions). Use `get_metadata` to list all available dimensions and metrics, and `check_compatibility` to verify your combination is valid before running.

**Does GA4 require two credentials — an access token and a property ID?**
Yes. You need a Google OAuth **Access Token** (for authentication via Bearer header) and a **GA4 Property ID** (numeric ID identifying your specific GA4 property). The Access Token can be generated via a Google Cloud Service Account with the Analytics Data API enabled. The Property ID is found in GA4 Admin > Property Settings.

**Can I see real-time active users on my website?**
Yes. The `run_realtime_report` tool provides current active user data with real-time dimensions and metrics. For pre-built convenience reports, use `get_page_views` for top pages, `get_traffic_sources` for session sources, and `get_device_breakdown` for device distribution.