文档
APIAPI 参考

访客

访客的搜索、详情,以及访客的会话与事件。

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

获取访客

Returns one visitor's profile: identity (if identified), first and last visit, location, device, and totals.

权限范围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.

visitorIdstring必填

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

1–512 chars
响应
POST/api/v1/sites/{siteId}/analytics/visitors/search

Lists visitors in the range with their first and last visit, sessions, 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":"lastSeenAt","direction":"desc"}
fieldstring必填
可选值"firstSeenAt""lastSeenAt""sessions""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/visitors/events

列出访客事件

Lists one visitor's page views and custom events in the range, newest first.

权限范围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"
visitorIdstring必填

Visitor ID from a visitors, sessions, 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
响应
POST/api/v1/sites/{siteId}/analytics/visitors/sessions

列出访客会话

Lists one visitor's sessions in the range, newest first.

权限范围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"
visitorIdstring必填

Visitor ID from a visitors, sessions, 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
响应