Plausible: aggregate stats
plausible_get_aggregateGet headline totals like visitors, pageviews, and bounce rate for a site over a date range. Useful for quick overviews of key metrics.
Instructions
Get headline totals for a site over a date range (one number per metric, no grouping).
Use this for questions like "how many visitors last week?" or "what was the bounce rate in March for /pricing?". Use plausible_get_timeseries for trends over time and plausible_get_breakdown for top-N lists.
Examples:
Last 7 days overview: {"site_id": "example.com", "date_range": "7d"}
Conversions of a goal: {"date_range": "30d", "metrics": ["visitors", "events", "conversion_rate"], "filters": [{"dimension": "event:goal", "operator": "is", "values": ["Signup"]}]}
Custom range for one page: {"date_range": {"from": "2024-03-01", "to": "2024-03-31"}, "filters": [{"dimension": "event:page", "operator": "is", "values": ["/pricing"]}]}
Notes: scroll_depth/time_on_page need an event:page filter; conversion_rate and revenue metrics need an event:goal filter; percentage is not available here (it needs a dimension).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Filters combined with logical AND. Each filter matches if any of its values match. | |
| metrics | No | Metrics to compute. Default: visitors, visits, pageviews, bounce_rate, visit_duration | |
| site_id | No | Site domain exactly as registered in Plausible, e.g. "example.com". Optional when PLAUSIBLE_DEFAULT_SITE_ID is set. | |
| date_range | No | Either a preset ("day", "24h", "7d", "28d", "30d", "91d", "month", "6mo", "12mo", "year", "all") or a custom range {"from": "2024-01-01", "to": "2024-01-31"} | 30d |
| response_format | No | "markdown" (default) for a readable table, "json" for machine-readable rows | markdown |
| include_imported | No | Include data imported from Google Analytics / CSV where Plausible supports it |