# Update analytics settings

**Publié le** : 2026-05-08
**Catégorie** : SEO & Analytics

## `PUT /analytics/settings`

**Update analytics settings**

Updates tracking exclusions and data retention settings.

Required permissions: `analytics.settings`

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tracking_enabled` | boolean | No | Boolean |
| `raw_events_retention_days` | number | No | Between 7 and 365 |
| `aggregated_retention_days` | number | No | Between 30 and 3650 |
| `excluded_paths` | string[] | No | Array of strings |
| `excluded_ips` | string[] | No | Array of strings |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |
| `422` | Validation error |


---