Documentation
APIAPI reference

Events

Custom events: summaries, time series, search, event types, and the fields and values in event payloads.

POST/api/v1/sites/{siteId}/analytics/events/summary

Get events summary

Returns totals for custom events in the range (events, event types, sessions, visitors, and events per session) and the top event and page.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
Responses
POST/api/v1/sites/{siteId}/analytics/events/timeseries

Get events time series

Returns event counts at time points. series contains top-N event-type aggregates for the whole window; points contains the time buckets. The request limit controls top-N event types, not the number of points.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
intervalstringrequired

Bucket size of the time series: minute, hour, day, week, or month. Keep the number of buckets reasonable for the time range.

Allowed"minute""hour""day""week""month"
limitintegerrequired

Number of top event types in series, 1–12.

Default 81–12
Responses
POST/api/v1/sites/{siteId}/analytics/events/search

Searches event records. Use page.limit for page size; it supports values from 1 through 200 and is independent of the events timeseries top-N limit.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
searchstring

Case-insensitive text search.

1–160 chars
eventNamestring

Only events with this name.

1–120 chars
sortobjectrequired

Sort field and direction.

Default {"field":"occurredAt","direction":"desc"}
fieldstringrequired
Allowed"occurredAt""eventName""pathname"
directionstringrequired
Allowed"asc""desc"
pageobjectrequired

Cursor pagination. Pass limit, then send cursor from the previous response's pagination.nextCursor to fetch the next page.

Default {"limit":80}
limitintegerrequired
Default 801–200
cursorstring | any | null
Responses
POST/api/v1/sites/{siteId}/analytics/events/detail

Get event

Returns one event with its payload, page, session, and visitor context.

Scopesanalytics:readBatchable
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

eventIdstringrequired

Event ID from an events or journey response.

1–512 chars
Responses
POST/api/v1/sites/{siteId}/analytics/event-types

List event types

Lists the custom event names seen in the range with their counts.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
searchstring

Case-insensitive text search.

1–160 chars
pageobjectrequired

Cursor pagination. Pass limit, then send cursor from the previous response's pagination.nextCursor to fetch the next page.

Default {"limit":20}
limitintegerrequired
Default 201–200
cursorstring | any | null
Responses
POST/api/v1/sites/{siteId}/analytics/event-types/detail

Get event type

Returns totals, a trend, and breakdowns by page, country, device, and browser for one event name.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
eventNamestringrequired

Custom event name, as sent by the tracking script.

1–120 chars
intervalstringrequired

Bucket size of the trend. Defaults to day.

Allowed"minute""hour""day""week""month"
Default "day"
Responses
POST/api/v1/sites/{siteId}/analytics/event-types/fields

List event fields

Lists the payload fields of one event name, with their value types and how often they appear.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
eventNamestringrequired

Custom event name, as sent by the tracking script.

1–120 chars
pageobjectrequired

Cursor pagination. Pass limit, then send cursor from the previous response's pagination.nextCursor to fetch the next page.

Default {"limit":100}
limitintegerrequired
Default 1001–200
cursorstring | any | null
Responses
POST/api/v1/sites/{siteId}/analytics/event-types/field-values

Returns the values of one payload field of an event name, with counts.

Scopesanalytics:readBatchable
Conditional scopes
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
Path parameters
siteIdstringrequired

ID of the site (see List sites).

≥ 1 chars
Request bodyapplication/json
timeRangeobjectrequired

Reporting window. Use { "kind": "preset", "preset": "last_7_days" } or an absolute range { "kind": "absolute", "from": "…", "to": "…" } with RFC 3339 timestamps. timeZone (IANA name) sets calendar boundaries for presets and buckets.

filterobject | any | null

Optional filter: { "type": "dsl", "expression": "page.path startsWith \"/blog\"" } uses the filter language, { "type": "inline", "expression": … } passes a structured expression, and { "type": "saved", "id": "…" } references a saved filter (requires analysis:read). Team queries accept dsl and inline only. Use null or omit the field for no filter.

scopestring

Which entity a filter condition selects. auto (default) picks the narrowest scope that fits the expression; event, session, and visitor force one.

Allowed"auto""event""session""visitor"
eventNamestringrequired

Custom event name, as sent by the tracking script.

1–120 chars
fieldPathstringrequired

JSON Pointer to the field, e.g. /plan.

1–240 chars
fieldValueTypestringrequired

Value type to list, as returned by List event fields.

Allowed"string""number""boolean""null""object""array"
searchstring

Case-insensitive text search.

≤ 256 chars
pageobjectrequired

Cursor pagination. Pass limit, then send cursor from the previous response's pagination.nextCursor to fetch the next page.

Default {"limit":25}
limitintegerrequired
Default 251–100
cursorstring | any | null
Responses