API
Sessions endpoints
These endpoints return single visits. Scope: sessions:read. They are not available for sites shared with Public Analytics. A private link gets them without personal fields.
Last updated . This guide belongs to Sessions and user profiles.
GET /sites/:siteId/sessions
| Parameter | Meaning | Default |
|---|---|---|
page, limit | Paging. Maximum 1,000 rows | 1, 100 |
user_id | Sessions for one visitor or one identified user | |
session_id | One session | |
identified_only | true returns only identified users | false |
min_pageviews, min_events, min_duration | Lower limits. Duration is in seconds |
It also takes the shared time parameters, filters and segment_id.
Each session has these groups of fields:
| Group | Fields |
|---|---|
| IDs | session_id, user_id, identified_user_id |
| Timing | session_start, session_end, session_duration, entry_page, exit_page |
| Counts | pageviews, events, errors, outbound, button_clicks, copies, form_submits, input_changes |
| Source | referrer, channel, hostname and the five utm_ fields |
| Location and device | country, region, city, language, device_type, browser, operating_system, screen size |
| Other | ip, lat, lon, tag, timezone, has_replay, traits |
The response has no total. Ask for the next page until you get fewer rows than limit.
GET /sites/:siteId/sessions/:sessionId
Returns one session and its events, oldest first. Performance events are left out.
| Parameter | Meaning | Default |
|---|---|---|
limit, offset | Paging through the events | 100, 0 |
minutes | Only the last minutes of the session |
{ "data": { "session": { "session_id": "a1b2c3d4e5f6", "country": "NO", "pageviews": 4 }, "events": [ { "timestamp": "2026-11-18 10:05:30.880", "pathname": "/pricing", "type": "custom_event", "event_name": "signup_click", "props": { "plan": "business" } } ], "pagination": { "total": 8, "limit": 100, "offset": 0, "hasMore": false } } }
An unknown session returns status 404.
GET /sites/:siteId/sessions/locations
Returns coordinates with a session count, for a map. It is refused for public sites and private links.
What does a private link leave out?
ip, lat, lon, traits, identified_user_id and profile fields such as email and username are removed.
user_id is replaced by an anonymous value. The value is the same within one response and different in the next, so a visitor cannot be followed from one request to another.