Analytics Settings

Change a project's analytics traffic settings. Applies to events ingested from now on; already-recorded events keep their classification.

Changed on
patch/projects/{project_id}/analytics/settings

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

project_idinteger required

Project ID

Request body

exclude_datacenter_trafficboolean nullable
exclude_spam_referrersboolean nullable

Response

Updated analytics settings

exclude_datacenter_trafficboolean required

Exclude visits from hosting/cloud/VPS networks (AWS, Google Cloud, Tencent, Alibaba, Hetzner, ...) from every analytics report. Privacy relays such as iCloud Private Relay are never treated as datacenters.

exclude_spam_referrersboolean required

Exclude visits whose referrer is on the bundled referrer-spam list (domains that exist only to plant fake referrals).

project_idinteger required
spam_referrer_list_sizeinteger required

Number of domains on the bundled referrer-spam list.

updated_atstring nullable

When the settings were last changed (ISO 8601). null while the project still uses the defaults.

Changes