文件
APIAPI 參考

工作階段

工作階段的搜尋、詳細資料,以及工作階段內的事件與造訪路徑。

POST/api/v1/sites/{siteId}/analytics/sessions/detail

取得工作階段

Returns one session: its visitor, entry and exit pages, source, device, and duration.

權限範圍analytics:read可批次
路徑參數
siteIdstring必填

ID of the site (see List sites).

≥ 1 chars
請求主體application/json
timeRangeobject必填

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.

sessionIdstring必填

Session ID from a sessions, visitors, or events response.

1–512 chars
回應
POST/api/v1/sites/{siteId}/analytics/journey-events/detail

取得旅程事件

Returns one item of a session journey, such as a page view, the session start, or the leave event, with its context.

權限範圍analytics:read可批次
路徑參數
siteIdstring必填

ID of the site (see List sites).

≥ 1 chars
請求主體application/json
timeRangeobject必填

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.

eventIdstring必填

Event ID from an events or journey response.

1–512 chars
eventKindstring

Kind of journey item, when the ID alone is ambiguous: pageview, session_start, or leave.

可用值"pageview""session_start""leave"
回應
POST/api/v1/sites/{siteId}/analytics/sessions/search

Lists sessions in the range with their entry page, duration, and views.

權限範圍analytics:read可批次
附加權限範圍
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
路徑參數
siteIdstring必填

ID of the site (see List sites).

≥ 1 chars
請求主體application/json
timeRangeobject必填

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 | 任意 | 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.

可用值"auto""event""session""visitor"
searchstring

Case-insensitive text search.

1–160 chars
sortobject必填

Sort field and direction.

預設 {"field":"startedAt","direction":"desc"}
fieldstring必填
可用值"startedAt""durationMs""views"
directionstring必填
可用值"asc""desc"
pageobject必填

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

預設 {"limit":80}
limitinteger必填
預設 801–200
cursorstring | 任意 | null
回應
POST/api/v1/sites/{siteId}/analytics/sessions/events

列出工作階段事件

Lists the page views and custom events of one session in order.

權限範圍analytics:read可批次
附加權限範圍
[
  {
    "when": "filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
路徑參數
siteIdstring必填

ID of the site (see List sites).

≥ 1 chars
請求主體application/json
timeRangeobject必填

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 | 任意 | 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.

可用值"auto""event""session""visitor"
sessionIdstring必填

Session ID from a sessions, visitors, or events response.

1–512 chars
pageobject必填

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

預設 {"limit":100}
limitinteger必填
預設 1001–500
cursorstring | 任意 | null
回應