Website statistics
Operations around Website statistics.
Endpoints
GET /api/websites/:websiteId/active
GET /api/websites/:websiteId/daterange
GET /api/websites/:websiteId/events/series
GET /api/websites/:websiteId/metrics
GET /api/websites/:websiteId/metrics/expanded
GET /api/websites/:websiteId/pageviews
GET /api/websites/:websiteId/statsFilters
All Endpoints marked with filters can now be filtered with the parameters below.
| Parameter | Type | Description |
|---|---|---|
path | string | Name of URL. |
referrer | string | Name of referrer. |
title | string | Name of page title. |
query | string | Name of query parameter. |
browser | string | Name of browser. |
os | string | Name of operating system. |
device | string | Name of device (ex. Mobile). |
country | string | Name of country. |
region | string | Name of region/state/province. |
city | string | Name of city. |
language | string | Name of browser language. |
hostname | string | Name of hostname. |
tag | string | Name of tag. |
event | string | Name of event. |
distinctId | string | Name of distinct ID. |
utmSource | string | UTM source. |
utmMedium | string | UTM medium. |
utmCampaign | string | UTM campaign name. |
utmContent | string | UTM content. |
utmTerm | string | UTM term. |
segment | uuid | UUID of segment. |
cohort | uuid | UUID of cohort. |
Unit Parameter
The unit parameter buckets the data returned. The unit is automatically converted to the next largest applicable time unit if the maximum is exceeded.
| Unit | Maximum |
|---|---|
minute | Up to 60 minutes. |
hour | Up to 30 days. |
day | Up to 6 months. |
month | No limit. |
year | No limit. |
GET /api/websites/:websiteId/active
Gets the number of active users on a website.
Sample response
{
"visitors": 5
}visitors: Number of unique visitors within the last 5 minutes
GET /api/websites/:websiteId/daterange
Gets the date range of available data for a website.
Sample response
{
"startDate": "2025-12-06T00:00:00Z",
"endDate": "2026-03-11T21:00:00Z"
}GET /api/websites/:websiteId/events/series
Gets events within a given time range.
Parameters
| Parameter | Type | Description |
|---|---|---|
startAt | number | Timestamp (in ms) of starting date. |
endAt | number | Timestamp (in ms) of end date. |
unit | string | Time unit (year | month | hour | day). |
timezone | string | Timezone (ex. America/Los_Angeles). |
filters | object | Can accept filter parameters. |
Sample response
[
{
"x": "live-demo-button",
"t": "2023-04-12T22:00:00Z",
"y": 1
},
{
"x": "get-started-button",
"t": "2023-04-12T22:00:00Z",
"y": 5
},
{
"x": "get-started-button",
"t": "2023-04-12T23:00:00Z",
"y": 4
},
{
"x": "live-demo-button",
"t": "2023-04-12T23:00:00Z",
"y": 4
},
{
"x": "social-Discord",
"t": "2023-04-13T00:00:00Z",
"y": 1
}
]| Field | Description |
|---|---|
x | Event name. |
t | Timestamp. |
y | Number of events. |
GET /api/websites/:websiteId/metrics
Gets metrics for a given time range.
Parameters
| Parameter | Type | Description |
|---|---|---|
startAt | number | Timestamp (in ms) of starting date. |
endAt | number | Timestamp (in ms) of end date. |
type | string | Metrics type. |
filters | object | Can accept filter parameters. |
limit | number | (optional, default 500) Number of rows returned. |
offset | number | (optional, default 0) Number of rows to skip. |
Available Types
path | entry | exit | title | query | referrer | channel | domain | country | region | city | browser | os | device | language | screen | event | hostname | tag | distinctId
Sample response
[
{
"x": "Mac OS",
"y": 1918
},
{
"x": "Windows 10",
"y": 1413
},
{
"x": "iOS",
"y": 464
},
{
"x": "Android OS",
"y": 301
},
{
"x": "Linux",
"y": 296
},
{
"x": "Windows 7",
"y": 29
},
{
"x": "Chrome OS",
"y": 12
}
]| Field | Description |
|---|---|
x | Unique value, depending on metric type. |
y | Number of visitors. |
GET /api/websites/:websiteId/metrics/expanded
Gets expanded metrics for a given time range.
Parameters
| Parameter | Type | Description |
|---|---|---|
startAt | number | Timestamp (in ms) of starting date. |
endAt | number | Timestamp (in ms) of end date. |
type | string | Metrics type. |
filters | object | Can accept filter parameters. |
limit | number | (optional, default 500) Number of rows returned. |
offset | number | (optional, default 0) Number of rows to skip. |
Available Types
path | entry | exit | title | query | referrer | channel | domain | country | region | city | browser | os | device | language | screen | event | hostname | tag | distinctId
Sample response
[
{
"name": "Mac OS",
"pageviews": 74020,
"visitors": 16982,
"visits": 24770,
"bounces": 15033,
"totaltime": 149156302
},
{
"name": "Windows 10",
"pageviews": 52252,
"visitors": 12858,
"visits": 20089,
"bounces": 12720,
"totaltime": 137208105
},
{
"name": "iOS",
"pageviews": 10029,
"visitors": 4364,
"visits": 5139,
"bounces": 3578,
"totaltime": 23482267
},
{
"name": "Android OS",
"pageviews": 8147,
"visitors": 3122,
"visits": 3854,
"bounces": 2610,
"totaltime": 20347972
},
{
"name": "Linux",
"pageviews": 12462,
"visitors": 3000,
"visits": 4278,
"bounces": 2630,
"totaltime": 26331069
}
]| Field | Description |
|---|---|
name | Unique value, depending on metric type. |
pageviews | Page hits. |
visitors | Number of unique visitors. |
visits | Number of unique visits. |
bounces | Number of visitors who only visit a single page. |
totaltime | Time spent on the website. |
GET /api/websites/:websiteId/pageviews
Gets pageviews within a given time range.
Parameters
| Parameter | Type | Description |
|---|---|---|
startAt | number | Timestamp (in ms) of starting date. |
endAt | number | Timestamp (in ms) of end date. |
unit | string | Time unit (year | month | hour | day). |
timezone | string | Timezone (ex. America/Los_Angeles). |
compare | string | (optional) Comparison period (prev | yoy). |
filters | object | Can accept filter parameters. |
Sample response
{
"pageviews": [
{
"x": "2025-10-19T07:00:00Z",
"y": 4129
},
{
"x": "2025-10-20T07:00:00Z",
"y": 6105
},
{
"x": "2025-10-21T07:00:00Z",
"y": 4936
}
],
"sessions": [
{
"x": "2025-10-19T07:00:00Z",
"y": 1397
},
{
"x": "2025-10-20T07:00:00Z",
"y": 1880
},
{
"x": "2025-10-21T07:00:00Z",
"y": 1469
}
]
}x: Timestamp.y: Number of pageviews or visitors.
GET /api/websites/:websiteId/stats
Gets summarized website statistics.
Parameters
| Parameter | Type | Description |
|---|---|---|
startAt | number | Timestamp (in ms) of starting date. |
endAt | number | Timestamp (in ms) of end date. |
filters | object | Can accept filter parameters. |
Sample response
{
"pageviews": 15171,
"visitors": 4415,
"visits": 5680,
"bounces": 3567,
"totaltime": 809968,
"comparison": {
"pageviews": 38675,
"visitors": 10568,
"visits": 14595,
"bounces": 9364,
"totaltime": 2182387
}
}| Field | Description |
|---|---|
pageviews | Page hits. |
visitors | Number of unique visitors. |
visits | Number of unique visits. |
bounces | Number of visitors who only visit a single page. |
totaltime | Time spent on the website. |