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

サイト設定

トラッキング、プライバシー、共有の設定と、サイトの計測スクリプト。

GET/api/v1/sites/{siteId}/settings/tracking

Returns what the tracking script records for the site: query strings, hashes, Web Vitals, outbound links, tracking strength, allowed domains, and excluded paths.

スコープsite_config:read
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
レスポンス
PATCH/api/v1/sites/{siteId}/settings/tracking

Updates the tracking settings. Send only the fields to change. The tracking script picks up the change on its next load.

スコープsite_config:write
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
リクエストボディapplication/json
trackQueryboolean
trackHashboolean
trackWebVitalsboolean
autoTrackOutboundLinksboolean
trackingStrengthstring

How visitors are identified: strong, smart (default), or weak. See the tracking settings guide.

使用できる値"strong""smart""weak"
allowedDomainsstring[]

Hostnames allowed to send data. Empty allows the site's own domain.

excludedPathsstring[]

Path patterns that are never recorded.

レスポンス
GET/api/v1/sites/{siteId}/settings/privacy

Returns the site's privacy settings, including Do Not Track handling and EU mode. IP anonymization, daily visitor tokens, and the retention period are fixed and returned for reference.

スコープsite_config:read
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
レスポンス
PATCH/api/v1/sites/{siteId}/settings/privacy

Updates whether Do Not Track is respected and whether EU mode is on. Send only the fields to change.

スコープsite_config:write
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
リクエストボディapplication/json
respectDoNotTrackboolean
euModeboolean
レスポンス
GET/api/v1/sites/{siteId}/settings/sharing

共有設定を取得

Returns whether the site's public dashboard is enabled and its slug.

スコープsite_config:read
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
レスポンス
PATCH/api/v1/sites/{siteId}/settings/sharing

共有設定を更新

Enables or disables the public dashboard, or changes its slug. Send only the fields to change.

スコープsite_config:write
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
リクエストボディapplication/json
publicEnabledboolean
publicSlugstring | null
レスポンス
GET/api/v1/sites/{siteId}/settings/tracking-script

Returns the tracking script URL and an HTML snippet to paste into the site's pages.

スコープsite_config:read
パスパラメーター
siteIdstring必須

ID of the site (see List sites).

1–256 chars
レスポンス