文件
APIAPI 參考

效能

Core Web Vitals 的彙總、時間序列與細分。

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

取得效能摘要

Returns Core Web Vitals for the range: average and percentile values of TTFB, FCP, LCP, CLS, and INP, with sample counts.

權限範圍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"
回應
POST/api/v1/sites/{siteId}/analytics/performance/timeseries

取得效能時間序列

Returns Core Web Vitals for each time bucket.

權限範圍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"
intervalstring必填

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

可用值"minute""hour""day""week""month"
回應
POST/api/v1/sites/{siteId}/analytics/performance/breakdowns/{dimension}

取得效能細分

Breaks down Core Web Vitals by page.path or geo.country. Other dimensions are not supported and return validation_failed.

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

ID of the site (see List sites).

≥ 1 chars
dimensionstring必填

Dimension to group by: page.path or geo.country.

可用值"page.path""geo.country"
請求主體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"
metricstring必填

Metric used to rank rows. Defaults to lcp.

可用值"ttfb""fcp""lcp""cls""inp"
預設 "lcp"
limitinteger必填

Maximum number of rows, 1–200.

預設 1001–200
回應