Saasco logoSaasco logo
Saasco logoSaasco logo

Introduction

Quick StartWhat is Saasco?

Analytics

postQuery EventsgetLatest EventsgetUser Events

CRM

Email Marketing

Knowledge

Support

Projects

Events

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.

GET
/projects/{projectId}/analytics/user-events

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

projectIdrequiredstring

ID of the project to read analytics from.

Query Parameters

browserstring

Only count activity from this browser, e.g. Chrome.

dateFromstring

Start of the window as a YYYY-MM-DD date, inclusive.

dateTostring

End of the window as a YYYY-MM-DD date, inclusive.

devicestring

Only count activity from this device type, e.g. mobile.

limitnumber

Maximum number of rows to return.

locationstring

Only count activity from this country name.

referrerstring

Only count activity with this exact referrer URL.

referringDomainstring

Only count activity from this referring domain, e.g. google.com.

skipnumber

Number of rows to skip before collecting results.

utmMediumstring

Only count activity tagged with this utm_medium.

cursornumber

Row offset to start from. Defaults to 0; pass the number of rows already received to fetch the next page.

daysAgonumber

Only return events from the last this-many days. Defaults to 30.

distinctIdrequiredstring

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.