文件
APIAPI 參考

即時

目前線上訪客、最新事件與工作階段的即時快照。

POST/api/v1/sites/{siteId}/analytics/realtime/snapshot

取得即時快照

Returns the active visitor count, recent events, and live visits in one response. Use a short time range ending now, such as the last 30 minutes.

權限範圍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.

limitinteger必填

Maximum number of events and sessions, 1–500.

預設 1001–500
回應
POST/api/v1/sites/{siteId}/analytics/realtime/active-visitors

取得活躍訪客

Returns the number of visitors active in the time range.

權限範圍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.

回應
POST/api/v1/sites/{siteId}/analytics/realtime/events

列出即時事件

Lists the most recent page views and events, newest first.

權限範圍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.

limitinteger必填

Maximum number of rows to return.

預設 1001–500
回應
POST/api/v1/sites/{siteId}/analytics/realtime/sessions

Lists sessions that were active in the time range.

權限範圍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.

limitinteger必填

Maximum number of rows to return.

預設 1001–500
回應