Analytics
Overview
The headline totals for a window — visitors, sessions, views, revenue.
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
AuthorizationstringheaderrequiredAn 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)pathrequiredQuery parameters
periodenum<string>querytodayyesterdaylast24hlast7dlast30dlast12mmonthyearallfromstring (date-time)querytostring (date-time)querytzstringquerydefault: UTCbotsenum<string>querydefault: excludedexcludedincludedfilter_pathstringqueryfilter_path_patternstringqueryfilter_hostnamestringqueryfilter_entry_pathstringqueryfilter_exit_linkstringqueryfilter_file_downloadstringqueryfilter_goalstringqueryfilter_browserstringqueryfilter_osstringqueryfilter_devicestringqueryfilter_countrystringqueryfilter_regionstringqueryfilter_citystringqueryfilter_referrerstringqueryfilter_channelstringqueryfilter_utm_sourcestringqueryfilter_utm_mediumstringqueryfilter_utm_campaignstringqueryfilter_gad_campaign_idstringqueryfilter_utm_termstringqueryfilter_bot_kindstringqueryResponse
The answer.
dataobjectmetaobjecterrorobjecterrorobjecterrorobjecterrorobject