# POST /google-analytics/reports

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

Run a Google Analytics report on a property, read live, the same as an exploration in Google Analytics: up to 9 dimensions (e.g. date, sessionDefaultChannelGroup, sessionSource, pagePath, landingPage, country, deviceCategory, eventName) and 1 to 10 metrics (e.g. activeUsers, totalUsers, newUsers, sessions, screenPageViews, engagementRate, averageSessionDuration, bounceRate, keyEvents, eventCount, totalRevenue), over up to 4 date ranges (default the last 28 days to yesterday). Optional dimension_filter and metric_filter (Google FilterExpressions), order_bys, limit (default 100, max 10000) and offset. Returns rows as objects keyed by dimension and metric name, totals, row_count, next_offset when there are more rows, and the property's remaining daily quota. Rates like bounceRate and engagementRate are fractions (0.42 = 42%). Find valid names with get_google_analytics_fields. status is "ok", "no_data", "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 | Dimension api names, up to 9, e.g. ["date", "sessionDefaultChannelGroup"]. Leave out for totals only. |
| `metrics` | body | array | yes | Metric api names, 1 to 10, e.g. ["activeUsers", "sessions", "keyEvents"]. |
| `date_ranges` | body | array | no | Up to 4 date ranges. Default: the last 28 days to yesterday. |
| `dimension_filter` | body | object | no | Only rows matching this. 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 | Only rows whose metrics match this (applied after aggregation), e.g. {"filter": {"fieldName": "sessions", "numericFilter": {"operation": "GREATER_THAN", "value": {"int64Value": "10"}}}}. |
| `order_bys` | body | array | no | Google OrderBy objects, e.g. [{"metric": {"metricName": "sessions"}, "desc": true}] or [{"dimension": {"dimensionName": "date"}}]. |
| `limit` | body | number | no | Rows to return, 1 to 10000. Default 100. |
| `offset` | body | number | no | Rows to skip, for paging (use next_offset from the previous answer). |
| `keep_empty_rows` | body | boolean | no | Also return rows whose metrics are all zero. |
| `currency_code` | body | string | no | Three-letter currency for revenue metrics, e.g. "AUD". Default: the property's own currency. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/google-analytics/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`