Skip to main content

Analytics

Overview

The headline totals for a window — visitors, sessions, views, revenue.

GET/sites/{siteId}/overview
Overview
curl --request GET \
  --url 'https://truestat.io/api/v1/sites/{siteId}/overview' \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "goals": 0,
    "views": 428,
    "payments": 0,
    "sessions": 51,
    "visitors": 23,
    "bounce_rate": 56,
    "new_visitors": 18,
    "revenue_cents": 0,
    "conversion_rate": 0,
    "goal_value_cents": 0,
    "returning_visitors": 6,
    "avg_session_seconds": 1629,
    "revenue_per_visitor_cents": 0
  },
  "meta": {
    "range": {
      "to": "2026-09-16T13:06:52.181Z",
      "tz": "UTC",
      "from": "2026-09-09T13:06:52.181Z",
      "clamped": false
    },
    "site_id": "11c85b19-b11f-4fbb-b6a1-9b500e357b8f"
  }
}

The figures across the top of the dashboard, for any window you ask for.

When to call this instead of the neighbours

Use overview

You want a number. "How many visitors last week", "what did we make in September". One query, one small object.

Call several endpoints

You are drawing a screen and need everything at once — the totals, the breakdowns, the chart series. That is one call per report, in parallel.

Most callers want the first. Overview is one query returning one small object; drawing a whole screen means asking breakdowns and timeseries for the pieces you actually show, rather than paying for twenty reports to use one.

Money is in cents

revenue_cents, goal_value_cents and revenue_per_visitor_cents are integers in the smallest unit of the site's currency. A float is the wrong type for money, and a field called revenue would leave you to guess whether 4250 meant forty-two pounds or four thousand.

goal_value_cents is deliberately separate from revenue_cents. Values attached to server-sent goals are yours to define; revenue comes from the payment provider and reconciles against it. Adding one to the other would put money on the dashboard that your Stripe account has never seen.

Read meta.range.clamped

Ask for a window older than your plan's retention and the answer covers what is retained, with clamped: true.

A caller that plots the result without reading the flag draws a chart missing the years it asked for, and nothing about the response says so. It is the difference between a short answer and a wrong one.

Crawler traffic is excluded by default. Pass bots=included to count it. The AI endpoints report it separately and always include it, whatever this parameter says.

Authorizations

Authorizationstringheaderrequired

An API key from Settings → API keys. Scopes available: analytics:read, sites:read, sites:write, settings:read, settings:write, goals:read, goals:write, funnels:read, funnels:write, notes:read, notes:write, alerts:read, alerts:write, team:read, team:write, revenue:read, revenue:write.

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path parameters

siteIdstring (uuid)pathrequired
The site's id, from `GET /sites`. A site that is not yours and a site that does not exist both answer 403, so this cannot be used to discover other people's ids.

Query parameters

periodenum<string>query
A named window, resolved in `tz`. Cannot be combined with `from`/`to` — a request carrying both is refused rather than guessed at.
options:todayyesterdaylast24hlast7dlast30dlast12mmonthyearall
fromstring (date-time)query
Start of the window, ISO 8601 with an offset. Must be given together with `to`.
tostring (date-time)query
End of the window. Must be given together with `from`.
tzstringquerydefault: UTC
IANA timezone for day boundaries. `period=today&tz=Europe/Istanbul` means the reader's today, not the server's. Defaults to UTC.
botsenum<string>querydefault: excluded
Whether crawler traffic is counted. Excluded by default — the `/ai/*` endpoints report it separately and always include it.
options:excludedincluded
filter_pathstringquery
Narrow the result to one `path`.
filter_path_patternstringquery
Narrow the result to one `path_pattern`.
filter_hostnamestringquery
Narrow the result to one `hostname`.
filter_entry_pathstringquery
Narrow the result to one `entry_path`.
filter_exit_linkstringquery
Narrow the result to one `exit_link`.
filter_file_downloadstringquery
Narrow the result to one `file_download`.
filter_goalstringquery
Narrow the result to one `goal`.
filter_browserstringquery
Narrow the result to one `browser`.
filter_osstringquery
Narrow the result to one `os`.
filter_devicestringquery
Narrow the result to one `device`.
filter_countrystringquery
Narrow the result to one `country`.
filter_regionstringquery
Narrow the result to one `region`.
filter_citystringquery
Narrow the result to one `city`.
filter_referrerstringquery
Narrow the result to one `referrer`.
filter_channelstringquery
Narrow the result to one `channel`.
filter_utm_sourcestringquery
Narrow the result to one `utm_source`.
filter_utm_mediumstringquery
Narrow the result to one `utm_medium`.
filter_utm_campaignstringquery
Narrow the result to one `utm_campaign`.
filter_gad_campaign_idstringquery
Narrow the result to one `gad_campaign_id`.
filter_utm_termstringquery
Narrow the result to one `utm_term`.
filter_bot_kindstringquery
Narrow the result to one `bot_kind`.

Response

application/json

The answer.

dataobject
metaobject