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.
Authorization
Authorization In: header
Path Parameters
ID of the project to read events from.
Query Parameters
Return only events with this action name. When omitted the feed excludes the $notification_shown and $notification_clicked social-proof events.
Adds the distinctId column to each row. This selects a column rather than filtering. Any value turns it on, and it does not narrow results to one contact.
Maximum number of events to return. Defaults to 50.
Adds the raw event payload to each row. Like distinctId, this is a column toggle: sending false still turns it on.
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/latest-events"{
"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",
"browser": "string",
"device": "string",
"distinctId": "string",
"href": "string",
"id": "string",
"location": "string",
"payload": "string",
"referrer": "string",
"timestamp": "string",
"unique": true
}
]
}{
"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": []
}Query Events
The general-purpose event reporting query. Pick a dimension to group by, the metrics to compute (`users`, `sessions`, `events`), and any filters, and it returns one aggregated row per group: a time series with `groupBy: "date"`, a top-pages table with `groupBy: "pathname"`, and so on. Dates are read in the project's configured timezone.
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.