ga4_run_report
Run a custom Google Analytics 4 report with specified metrics, dimensions, filters, and date ranges to retrieve analytics data.
Instructions
Run an arbitrary GA4 report (the runReport method).
metrics and dimensions are GA4 API names, not UI labels: 'sessions', 'activeUsers', 'screenPageViews', 'conversions', 'totalRevenue'; 'landingPage', 'pagePath', 'sessionDefaultChannelGroup', 'country', 'date'. Not every dimension is compatible with every metric - a 400 error means the pair is not queryable together, not that the names are wrong. dimension_filter and order_by take GA4 FilterExpression and OrderBy objects as plain dicts. Dates accept YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo'. GA4 reports in the property's own timezone, so its dates do not line up exactly with Search Console's.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| metrics | Yes | ||
| end_date | No | yesterday | |
| order_by | No | ||
| dimensions | No | ||
| start_date | No | 28daysAgo | |
| property_id | No | ||
| dimension_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| notes | Yes | ||
| export | No | ||
| summary | Yes | ||
| export_rows | No |