User Events
Returns one user's event history, newest first: the activity timeline for a single person. Events fired before they were identified are stitched in by anonymous ID, so the timeline reaches back past the identify() call. Social-proof popup events are excluded. Page through it with cursor, which is a row offset: pass the number of rows already received to get the next batch.
Authorization
Authorization In: header
Path Parameters
ID of the project to read analytics from.
Query Parameters
Only count activity from this browser, e.g. Chrome.
Start of the window as a YYYY-MM-DD date, inclusive.
End of the window as a YYYY-MM-DD date, inclusive.
Only count activity from this device type, e.g. mobile.
Maximum number of rows to return.
Only count activity from this country name.
Only count activity with this exact referrer URL.
Only count activity from this referring domain, e.g. google.com.
Number of rows to skip before collecting results.
Only count activity tagged with this utm_medium.
Row offset to start from. Defaults to 0; pass the number of rows already received to fetch the next page.
Only return events from the last this-many days. Defaults to 30.
Distinct ID of the user whose events to return.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.saasco.com/api/v2/projects/string/analytics/user-events?distinctId=string"{
"meta": [
{
"name": "string",
"type": "string"
}
],
"rows": 0,
"statistics": {
"bytes_read": 0,
"elapsed": 0,
"rows_read": 0
},
"usage": {
"cost": 0,
"duration": 0,
"metricCount": 0
},
"data": [
{
"action": "string",
"anonymousId": "string",
"context": "string",
"distinctId": "string",
"payload": "string",
"projectId": "string",
"sessionId": "string",
"source": "unknown",
"version": "string",
"id": "string",
"timestamp": "string"
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Latest Events
Returns the project's most recent events, newest first: the live activity feed. Each row carries the action, timestamp, page, referrer, and the visitor's device, browser, and country. Social-proof popup events are hidden unless you ask for them by `action`.
Query Sessions
The session-level counterpart to Query Events, grouping visits rather than individual events. Adds session-only metrics (`pageViews`, `bounceRate`, `avgSessionSec`) that cannot be derived from the event stream. Use this for traffic and engagement reporting, and Query Events for anything keyed on a specific action.