# GET /websites/:website_id/posthog-traffic

**Resource:** [Websites](./websites.md)  
**MCP tool:** `get_website_posthog_traffic`  
**Scopes:** `websites:read`  
**Write operation:** no

Get a website's traffic from the workspace's connected PostHog, read live, matching what PostHog's web analytics shows: unique visitors, visits, page views, average visit length (seconds) and bounce rate (%), each with the previous period and the change in %, plus one breakdown table (visitors and page views per row, with the previous period), and daily: visitors and page views per day (date as YYYY-MM-DD; null if PostHog could not answer it). Breakdowns: channel (default), referrer, utm_source, campaign, page, entry_page, country, device, browser. page and entry_page rows also carry bounce rate and links to that page's recordings and heatmap in PostHog. Only visits to the website's domains are counted (see update_website_posthog_link). status is "ok", "no_data", "not_linked" or "not_connected"; only "ok" has numbers. For visitors who became leads, use get_website_lead_conversion.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `website_id` | path | string | yes | UUID of the website. Get ids from list_websites. |
| `period` | query | string | no | How far back to look: 7d, 30d (default), 90d or 6m (six months). Numbers are compared with the period just before it. |
| `breakdown` | query | string | no | What to break visitors down by. Defaults to channel. |
| `limit` | query | number | no | Breakdown rows to return, 1 to 100. Defaults to 10. |

## Request example

```bash
curl   "https://api.trustpager.com/functions/v1/api/v1/websites/:website_id/posthog-traffic"   -H "Authorization: Bearer YOUR_API_KEY"
```

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