tracking_recording-settings_set
Turn session recording on or off for the current product, choose the hosts whose pages are recorded, and set the percent of sessions recorded (1 to 100 when on).
Turn session recording on or off for the current product, choose the hosts whose pages are recorded, and set the percent of sessions recorded (1 to 100 when on). Turning it on requires at least one host: list only the sites meant to be recorded (e.g. the marketing site, not an app or console showing customer data — page text is recorded as shown). tracking_recording-settings_get returns candidate hosts. Browsers pick the change up within about 10 minutes; the server applies it to new data within a minute. Returns: { enabled, sampleRate, hosts }. Fails when: enabled is true and hosts is missing or empty ("choose at least one host to record"); a host is not a bare hostname; more than 20 hosts; sampleRate is outside 1..100 while enabled; the call carries no product.
Behavior
- HTTP
PUT /tracking/recording-settings
Arguments
Name | Type | Required | Description |
|---|---|---|---|
hosts | array | — | Exact hostnames whose pages are recorded, e.g. ["example.com", "www.example.com"]; pages on any other host are never recorded. Bare hosts only — no scheme, port, path or wildcard; www and each subdomain are separate hosts. Up to 20. Recording on with no hosts records nothing. Required, at least one, when enabled is true; when turning recording off it may be left out to keep the stored list. |
enabled | boolean | • | Whether session recording is on. Only visitors in full tracking mode (statistics consent, or no consent banner) are recorded. |
sampleRate | integer | • | Percent of sessions recorded, 1 to 100 when on (e.g. 25); 0 is allowed only when off. |
Response
Field | Type | Always | Description |
|---|---|---|---|
hosts | array | • | Exact hostnames whose pages are recorded, e.g. ["example.com", "www.example.com"]; pages on any other host are never recorded. Bare hosts only — no scheme, port, path or wildcard; www and each subdomain are separate hosts. Up to 20. Recording on with no hosts records nothing. |
enabled | boolean | • | Whether session recording is on. Only visitors in full tracking mode (statistics consent, or no consent banner) are recorded. |
sampleRate | integer | • | Percent of sessions recorded, 1 to 100 when on (e.g. 25); 0 is allowed only when off. |
Try it
Turn session recording on or off for the current product, choose the hosts whose pages are recorded, and set the percent of sessions recorded (1 to 100 when on).