# POST /google-analytics/realtime-reports

**Resource:** [Websites](./websites.md)  
**MCP tool:** `run_google_analytics_realtime_report`  
**Scopes:** `websites:read`  
**Write operation:** no

Run a Google Analytics realtime report: what happened in the last 30 minutes (or chosen minute ranges). Metrics default to activeUsers; others include eventCount, keyEvents and screenPageViews. Realtime dimensions include unifiedScreenName (page title), country, city, deviceCategory, platform, eventName, minutesAgo and audienceName (up to 4). Returns rows keyed by name and totals. status is "ok", "no_data" (nobody on the site right now), "not_connected" or "reconnect_required".

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `property_id` | body | string | no | Google Analytics property id (a number like "123456789") from list_google_analytics_properties. Leave out to use the workspace's default property. |
| `dimensions` | body | array | no | Realtime dimension names, up to 4, e.g. ["unifiedScreenName"] or ["country"]. |
| `metrics` | body | array | no | Realtime metric names, up to 5. Default ["activeUsers"]. |
| `minute_ranges` | body | array | no | Up to 2 windows within the last 30 minutes, e.g. [{"start_minutes_ago": 4, "end_minutes_ago": 0}]. Default: the whole last 30 minutes. |
| `dimension_filter` | body | object | no | A Google Analytics Data API FilterExpression, e.g. {"filter": {"fieldName": "country", "stringFilter": {"value": "Australia"}}}; combine with {"andGroup": {"expressions": [...]}}, {"orGroup": ...} or {"notExpression": ...}. |
| `metric_filter` | body | object | no | A Google FilterExpression on metrics. |
| `order_bys` | body | array | no | Google OrderBy objects, e.g. [{"metric": {"metricName": "activeUsers"}, "desc": true}]. |
| `limit` | body | number | no | Rows to return, 1 to 10000. Default 100. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/google-analytics/realtime-reports"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"property_id":"...","dimensions":"...","metrics":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`