# PATCH /websites/:website_id/analytics

**Resource:** [Websites](./websites.md)  
**MCP tool:** `update_website_traffic_reporting`  
**Scopes:** `websites:write`  
**Write operation:** yes

Record whether the tracking snippet is present on the live site. Set beacon_installed true once the snippet has been added and the site redeployed, so the traffic reports stop warning that data may be missing.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `website_id` | path | string | yes |  |
| `beacon_installed` | body | boolean | no | Whether the tracking snippet is now present in the live site. Set true after adding it to the site and redeploying; the traffic reports stop warning about missing data once this is true. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/websites/:website_id/analytics"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"beacon_installed":"...","require_approval":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`