Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Live visitors visualisation docs

Blue Mouseb12d683f1a13
diff --git a/docs/content/docs/analytics-dashboard/live-visitors.mdx b/docs/content/docs/analytics-dashboard/live-visitors.mdx
index 19e404b31..e9aa16c25 100644
--- a/docs/content/docs/analytics-dashboard/live-visitors.mdx
+++ b/docs/content/docs/analytics-dashboard/live-visitors.mdx
@@ -14,6 +14,27 @@ In the top right corner of your dashboard (and on the main Traffic overview), yo
- **What it counts**: This number represents the count of unique visitors who have initiated a session or viewed a page within the last **5 minutes**.
- **Updates**: The counter updates in real-time as new visitors arrive or existing ones leave (time out).
+## Live Visitors Over Time
+
+The live counter tells you what's happening right now, but you can also chart concurrency historically. Unlike unique visitors (which only count when a session starts), this metric shows how many people were using your site *at the same time* — so you can spot peak load, quiet hours, and how long people actually stay around.
+
+To enable it:
+
+1. Open the **Traffic** dashboard.
+2. Click the **Metrics visualisation** (eye) icon above the chart.
+3. Check **Live visitors**.
+
+How to read the chart:
+
+- **Minute granularity** (e.g. the "Today" period): each point is the exact number of visitors who were active during that minute.
+- **Hour, day or month granularity**: each point is the **peak** number of concurrent visitors within that bucket. A value of 69 on Tuesday means that at some moment on Tuesday, 69 people were on your site at once.
+
+A visitor counts as active from their first pageview until their last recorded activity (pageviews, custom events, or the tracking script's periodic heartbeats), so the chart also works for single-page apps where people stay on one page for a long time.
+
+:::info
+Live visitors can't be combined with dashboard filters (country, page, browser, etc.), as concurrency is reconstructed from session activity that carries no dimension data. The metric toggle is disabled while filters are applied.
+:::
+
## Live Visitors in Browser Title
You can configure Swetrix to display the live visitor count directly in your browser tab's title. This is useful for keeping an eye on traffic without having the dashboard tab active.
diff --git a/docs/content/docs/analytics-dashboard/traffic.mdx b/docs/content/docs/analytics-dashboard/traffic.mdx
index 7768eec3d..80c4c6f33 100644
--- a/docs/content/docs/analytics-dashboard/traffic.mdx
+++ b/docs/content/docs/analytics-dashboard/traffic.mdx
@@ -20,6 +20,7 @@ The main chart visualizes various metrics to help you understand your traffic pe
- **Pageviews**: The total number of pages viewed.
- **Session Duration**: The average time visitors spend on your site per session.
- **Bounce Rate**: The percentage of visitors who navigate away from the site after viewing only one page.
+- **Live Visitors**: How many people were using your site at the same time. At minute granularity this is the exact number of concurrent visitors; at hourly or larger granularity the chart shows the peak concurrency within each bucket. See [Live Visitors](/analytics-dashboard/live-visitors) for details.
- **Views per Unique**: The average number of pages viewed by a single unique visitor.
- **Revenue**: Total revenue generated (if revenue tracking is enabled).
diff --git a/docs/content/docs/api/stats.mdx b/docs/content/docs/api/stats.mdx
index a5153952e..0fe0cc352 100644
--- a/docs/content/docs/api/stats.mdx
+++ b/docs/content/docs/api/stats.mdx
@@ -261,7 +261,8 @@ curl 'https://api.swetrix.com/v1/log?pid=YOUR_PROJECT_ID&timeBucket=day&period=7
],
"visits": [0, 2, 9, 12, 4, 7, 4, 0],
"uniques": [0, 2, 9, 10, 4, 7, 4, 0],
- "sdur": [0, 54, 2, 126, 8, 8, 2]
+ "sdur": [0, 54, 2, 126, 8, 8, 2],
+ "concurrency": [0, 1, 3, 4, 2, 2, 1, 0]
},
"customs": {
"sale": 16,
@@ -274,6 +275,10 @@ curl 'https://api.swetrix.com/v1/log?pid=YOUR_PROJECT_ID&timeBucket=day&period=7
}
```
+:::info
+`chart.concurrency` is the number of live (concurrent) visitors over time, reconstructed from session activity. For the `minute` time bucket it's the exact number of visitors active during that minute; for larger buckets it's the peak concurrency within the bucket. When `filters` are applied, this array is zero-filled, as concurrency cannot be segmented by dimensions.
+:::
+
#### Parameters
<hr />
@@ -1259,7 +1264,7 @@ The parameters are similar to the [`/log` endpoint](#get-v1log).
### GET /v1/log/chart
-Returns data for the main chart (visits, uniques, sessions duration, etc.) grouped by time bucket. This is useful when you only need the chart data without other aggregations.
+Returns data for the main chart (visits, uniques, sessions duration, concurrent live visitors, etc.) grouped by time bucket. This is useful when you only need the chart data without other aggregations.
```bash
curl 'https://api.swetrix.com/v1/log/chart?pid=YOUR_PROJECT_ID&timeBucket=day&period=7d'\