---
title: "What the installed script collects"
method: GET
path: "/sites/{id}/settings/tracking"
tags: ["Sites"]
---

# What the installed script collects

`GET /sites/{id}/settings/tracking`

## Request

- Base URL: `https://statable.com/api/v1`
- URL: `https://statable.com/api/v1/sites/{id}/settings/tracking`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/statable/apis/statable-stats-api/docs/sites/:id/settings/tracking/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the site's effective feature selection plus the full catalogue — each entry's state, its dependencies and its marginal brotli cost — so a caller can trade capability against script weight without a second call. Owner or admin only.

## Response `200`

The site's tracking settings.

- TrackingSettings
  - `site_id` integer, required
  - `version` integer, required: Catalogue version.
  - `bundle` string, required: The build actually served for this site.
  - `enabled` string[], required
  - `features` TrackingFeatureState[], required
    - `id` string, required
    - `label` string, required
    - `enabled` boolean, required
    - `locked` boolean, required: Always collected; cannot be turned off.
    - `default` boolean, required
    - `requires` string[]: Feature ids that must also be enabled.
    - `size_br` integer, required: Marginal cost in bytes, brotli-compressed.

## Other responses

- `401`: Missing/malformed/invalid/revoked bearer token (`unauthorized`), or a key past its expiry (`key_expired`; the message names the expiry time).
- `403`: `insufficient_scope`, `key_not_scoped`, or `not_site_owner`.
- `404`: `write_disabled` or `unknown_site`.
- `429`: Hourly account (default 2000/h) or per-key (default 600/h) limit hit (`rate_limited`). Retry after the `Retry-After` seconds. The X-RateLimit-* headers report the window that tripped (account on an account limit).
- `500`: Unexpected server error (`internal`). Report it with the `request_id` from the body or the X-Request-ID header: it is what lets the exact log entry be found, and without it a 500 can only be matched by guessing at a time window.

---

[API](https://skmtc.dev/statable/apis/statable-stats-api.md) - [All operations](https://skmtc.dev/statable/apis/statable-stats-api/llms.txt) - [OpenAPI document](https://skmtc.dev/statable/apis/statable-stats-api/revisions/352b6d47c186?raw)
