ドキュメント
APIAPI リファレンス

分析

概要、時系列、内訳、比較、ページ、参照元、チャネル、リテンションなどの分析クエリと、フィルター項目の確認。

POST/api/v1/sites/{siteId}/analytics/overview

Returns aggregate metrics for the time range, such as views, sessions, visitors, bounce rate, and average duration.

スコープ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"
metricsstring[]

Metrics to return. Omit to return the default set (views, sessions, visitors, bounces, bounce rate, average duration, views per session).

使用できる値"views""sessions""visitors""bounces""bounceRate""avgDurationMs""viewsPerSession""events"
1–20 items
レスポンス
POST/api/v1/team/analytics/overview

Returns aggregate metrics across all sites the API key can access.

スコープanalytics:readバッチ対応
リクエストボディ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"
metricsstring[]

Metrics to return. Omit to return the default set (views, sessions, visitors, bounces, bounce rate, average duration, views per session).

使用できる値"views""sessions""visitors""bounces""bounceRate""avgDurationMs""viewsPerSession""events"
1–20 items
レスポンス
POST/api/v1/sites/{siteId}/analytics/comparison

Compares metrics between two datasets, each with its own time range and filter, and returns current values, reference values, and their absolute and relative change. Optionally returns a trend for both.

スコープanalytics:readバッチ対応
追加スコープ
[
  {
    "when": "current.filter.type=saved|reference.filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

≥ 1 chars
リクエストボディapplication/json
version2必須

Comparison contract version. Always 2.

timeZonestring必須

IANA time zone used for both datasets, so presets and trend buckets use the same calendar boundaries.

1–80 chars
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"
currentobject必須

The dataset being measured: a time range (absolute or preset) and an optional filter.

timeRangeobject必須
filterobject | 任意 | null
referenceobject必須

The dataset to compare against. Besides absolute and preset ranges, { "kind": "previous_period" } uses the period of equal length right before current.

timeRangeobject必須
filterobject | 任意 | null
selectobject必須

Which metrics to compare, and optionally a trend with an interval and its own metric list.

metricsstring[]必須
使用できる値"views""sessions""visitors""bounces""totalDurationMs""durationViews""bounceRate""avgDurationMs""viewsPerSession""events"
1–10 items
trendobject
レスポンス
POST/api/v1/sites/{siteId}/analytics/comparison/breakdowns/{dimension}

Compares two datasets row by row for one dimension (the path parameter), e.g. which pages gained or lost the most visitors.

スコープanalytics:readバッチ対応
追加スコープ
[
  {
    "when": "current.filter.type=saved|reference.filter.type=saved",
    "scopes": [
      "analytics:read",
      "analysis:read"
    ]
  }
]
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

≥ 1 chars
dimensionstring必須

Dimension to group by. The analytics schema operation lists the dimensions available on this instance.

使用できる値"page.path""page.title""page.hostname""page.query""page.hash""session.entryPath""session.exitPath""referrer.domain""referrer.url""utm.source""utm.medium""utm.campaign""utm.term""utm.content""client.browser""client.browserVersion""client.browserEngine""client.os""client.osVersion""client.deviceType""client.language""client.screenSize""geo.country""geo.region"+5
≥ 1 chars
リクエストボディapplication/json
version2必須

Comparison contract version. Always 2.

timeZonestring必須

IANA time zone used for both datasets, so presets and trend buckets use the same calendar boundaries.

1–80 chars
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"
currentobject必須

The dataset being measured: a time range (absolute or preset) and an optional filter.

timeRangeobject必須
filterobject | 任意 | null
referenceobject必須

The dataset to compare against. Besides absolute and preset ranges, { "kind": "previous_period" } uses the period of equal length right before current.

timeRangeobject必須
filterobject | 任意 | null
limitinteger必須

Maximum number of rows, 1–200.

既定値 201–200
sortobject必須

Sort by a current, reference, or change metric, or by key.

既定値 {"by":"current.views","direction":"desc"}
bystring必須
使用できる値"current.views""current.sessions""current.visitors""reference.views""reference.sessions""reference.visitors""change.views.absolute""change.views.relative""change.sessions.absolute""change.sessions.relative""change.visitors.absolute""change.visitors.relative""key"
directionstring必須
使用できる値"asc""desc"
既定値 "desc"
レスポンス
POST/api/v1/team/analytics/comparison

Compares metrics between two team-wide datasets, each with its own time range and filter.

スコープanalytics:readバッチ対応
リクエストボディapplication/json
version2必須

Comparison contract version. Always 2.

timeZonestring必須

IANA time zone used for both datasets, so presets and trend buckets use the same calendar boundaries.

1–80 chars
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"
currentobject必須

The dataset being measured: a time range (absolute or preset) and an optional filter.

timeRangeobject必須
filterobject | 任意 | null
referenceobject必須

The dataset to compare against. Besides absolute and preset ranges, { "kind": "previous_period" } uses the period of equal length right before current.

timeRangeobject必須
filterobject | 任意 | null
selectobject必須

Which metrics to compare, and optionally a trend with an interval and its own metric list.

metricsstring[]必須
使用できる値"views""sessions""visitors""bounces""totalDurationMs""durationViews""bounceRate""avgDurationMs""viewsPerSession""events"
1–10 items
trendobject
レスポンス
POST/api/v1/team/analytics/comparison/breakdowns/{dimension}

Compares two team-wide datasets row by row for one dimension (the path parameter).

スコープanalytics:readバッチ対応
パスパラメーター
dimensionstring必須

Dimension to group by. The analytics schema operation lists the dimensions available on this instance.

使用できる値"page.path""page.title""page.hostname""page.query""page.hash""session.entryPath""session.exitPath""referrer.domain""referrer.url""utm.source""utm.medium""utm.campaign""utm.term""utm.content""client.browser""client.browserVersion""client.browserEngine""client.os""client.osVersion""client.deviceType""client.language""client.screenSize""geo.country""geo.region"+5
≥ 1 chars
リクエストボディapplication/json
version2必須

Comparison contract version. Always 2.

timeZonestring必須

IANA time zone used for both datasets, so presets and trend buckets use the same calendar boundaries.

1–80 chars
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"
currentobject必須

The dataset being measured: a time range (absolute or preset) and an optional filter.

timeRangeobject必須
filterobject | 任意 | null
referenceobject必須

The dataset to compare against. Besides absolute and preset ranges, { "kind": "previous_period" } uses the period of equal length right before current.

timeRangeobject必須
filterobject | 任意 | null
limitinteger必須

Maximum number of rows to return.

既定値 201–200
sortobject必須

Sort field and direction.

既定値 {"by":"current.views","direction":"desc"}
bystring必須
使用できる値"current.views""current.sessions""current.visitors""reference.views""reference.sessions""reference.visitors""change.views.absolute""change.views.relative""change.sessions.absolute""change.sessions.relative""change.visitors.absolute""change.visitors.relative""key"
directionstring必須
使用できる値"asc""desc"
既定値 "desc"
レスポンス
GET/api/v1/sites/{siteId}/analytics/schema

Lists the fields, operators, dimensions, and metrics available for this site's queries. Call it first to discover valid filter fields and breakdown dimensions.

スコープanalytics:readバッチ対応
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

≥ 1 chars
レスポンス
GET/api/v1/team/analytics/schema

Lists the fields, operators, dimensions, and metrics available for team-wide queries.

スコープanalytics:readバッチ対応
レスポンス
POST/api/v1/sites/{siteId}/analytics/timeseries

Returns views, sessions, and visitors for each time bucket in the range.

スコープ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/team/analytics/timeseries

Returns views, sessions, and visitors per time bucket across all accessible sites.

スコープanalytics:readバッチ対応
リクエストボディ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/team/analytics/sites

Returns metrics for each accessible site, optionally with a small trend per site. Use it to build a sites overview.

スコープanalytics:readバッチ対応
リクエストボディ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

Add a trend per site with this bucket size.

使用できる値"minute""hour""day""week""month"
pageobject必須

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

既定値 {"limit":20}
limitinteger必須
既定値 201–100
cursorstring | 任意 | null
レスポンス
POST/api/v1/sites/{siteId}/analytics/breakdowns/{dimension}

Groups traffic by one dimension (the path parameter), such as pages, countries, or browsers, and returns the top rows with their metrics.

スコープ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. The analytics schema operation lists the dimensions available on this instance.

使用できる値"page.path""page.title""page.hostname""page.query""page.hash""session.entryPath""session.exitPath""referrer.domain""referrer.url""utm.source""utm.medium""utm.campaign""utm.term""utm.content""client.browser""client.browserVersion""client.browserEngine""client.os""client.osVersion""client.deviceType""client.language""client.screenSize""geo.country""geo.region"+5
≥ 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"
limitinteger必須

Maximum number of rows, 1–200.

既定値 201–200
レスポンス
POST/api/v1/team/analytics/breakdowns/{dimension}

Groups traffic across all accessible sites by one dimension (the path parameter).

スコープanalytics:readバッチ対応
パスパラメーター
dimensionstring必須

Dimension to group by. The analytics schema operation lists the dimensions available on this instance.

使用できる値"page.path""page.title""page.hostname""page.query""page.hash""session.entryPath""session.exitPath""referrer.domain""referrer.url""utm.source""utm.medium""utm.campaign""utm.term""utm.content""client.browser""client.browserVersion""client.browserEngine""client.os""client.osVersion""client.deviceType""client.language""client.screenSize""geo.country""geo.region"+5
≥ 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"
limitinteger必須

Maximum number of rows to return.

既定値 201–200
レスポンス
POST/api/v1/sites/{siteId}/analytics/cross-breakdowns

Groups traffic by two dimensions: the top values of the primary dimension, each split by the top values of the secondary dimension.

スコープ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"
primaryDimensionstring必須

First dimension, e.g. geo.country.

1–128 chars
secondaryDimensionstring必須

Dimension used to split each primary row.

1–128 chars
primaryLimitinteger必須

Number of primary rows, 1–12.

既定値 51–12
secondaryLimitinteger必須

Number of secondary rows per primary row, 1–8.

既定値 61–8
レスポンス
POST/api/v1/sites/{siteId}/analytics/pages

Lists the site's pages with their views and sessions, sorted by 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"
pageobject必須

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

既定値 {"limit":20}
limitinteger必須
既定値 201–200
cursorstring | 任意 | null
includeDetailsboolean必須

Split rows by query string and hash instead of grouping them by path.

既定値 false
レスポンス
POST/api/v1/sites/{siteId}/analytics/referrers

Lists the referring domains (or full URLs) that send traffic.

スコープ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"
sortstring必須

Sort by views or visitors.

使用できる値"views""visitors"
既定値 "views"
directionstring必須

Sort direction: asc or desc.

使用できる値"asc""desc"
既定値 "desc"
pageobject必須

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

既定値 {"limit":20}
limitinteger必須
既定値 201–200
cursorstring | 任意 | null
includeFullUrlboolean必須

Group by full referrer URL instead of domain.

既定値 false
searchstring

Only referrers containing this text.

1–256 chars
レスポンス
POST/api/v1/sites/{siteId}/analytics/channels

Groups traffic into acquisition channels such as direct, organic search, social, and referral.

スコープ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"
limitinteger必須

Maximum number of rows to return.

既定値 201–200
レスポンス
POST/api/v1/sites/{siteId}/analytics/filter-values

Returns the values seen for a filter field in the time range, with counts. Use it to build a filter or to suggest values.

スコープ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"
fieldstring必須

A filter field from the analytics schema, e.g. geo.country. Event payload fields are not enumerable here; use Search event field values instead.

1–128 chars
searchstring

Case-insensitive text search.

≤ 256 chars
pageobject必須

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

既定値 {"limit":50}
limitinteger必須
既定値 501–200
cursorstring | 任意 | null
レスポンス
POST/api/v1/sites/{siteId}/analytics/retention/cohorts

Groups visitors by the period of their first visit and returns the share that came back in each later period.

スコープ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"
granularitystring必須

Cohort size: visitors are grouped by the minute, hour, day, week, or month of their first visit.

使用できる値"minute""hour""day""week""month"
レスポンス