# Analytics · Content Delivery API

> Content Delivery API reference for analytics: POST /analytics/pageview, POST /analytics/bot-hit.

> Markdown version of https://kanorio.com/en/developers/delivery-api/analytics. Append `.md` to any developer docs URL for this format. Index: https://kanorio.com/llms.txt · MCP: https://app.kanorio.com/api/mcp

Base URL: `https://{site}/api/v1` · [Errors](https://kanorio.com/en/developers/basics/errors) · [Pagination](https://kanorio.com/en/developers/basics/pagination)

### Record an anonymous pageview from an external storefront (per-IP rate-limited)

`POST /analytics/pageview`

- Stability: beta
- Authentication: none

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `path` | string | yes | Relative path starting with / |
| `referrer` | string | no | — |
| `title` | string | no | — |
| `uaCategory` | "desktop" \| "mobile" \| "tablet" \| "bot" | no | — |

**Response** (200)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `uaCategory` | string | no | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `INVALID_BODY` | 400 | — |
| `INVALID_PATH` | 400 | — |

```bash
curl -X POST "https://{site}/api/v1/analytics/pageview" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Record an AI crawler visit from an external storefront edge middleware (per-IP rate-limited)

`POST /analytics/bot-hit`

- Stability: beta
- Authentication: none

**Request body**

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `botToken` | string | no | Recognized crawler token (e.g. GPTBot, ClaudeBot, PerplexityBot) |
| `path` | string | yes | Relative path starting with / |
| `userAgent` | string | no | — |

**Errors**

| Code | Status | When |
| --- | --- | --- |
| `INVALID_BODY` | 400 | — |
| `INVALID_PATH` | 400 | — |
| `UNKNOWN_BOT` | 400 | — |

```bash
curl -X POST "https://{site}/api/v1/analytics/bot-hit" \
  -H "Content-Type: application/json" \
  -d '{}'
```
