---
title: "Raw `analytics_events` rows for a site (debug)"
method: GET
path: "/sites/{id}/analytics/raw-events"
tags: ["Sites"]
---

# Raw \`analytics_events\` rows for a site (debug)

`GET /sites/{id}/analytics/raw-events`

## Request

- Base URL: `https://api.nippy.host`
- URL: `https://api.nippy.host/sites/{id}/analytics/raw-events`
- Auth: `bearer` (a scheme the document does not define)

Returns the most-recent rows the worker has written for this site, newest first, capped by `limit`. Diagnostic surface — the aggregated panels are derived from these rows, so when a number looks wrong you can read the underlying events directly.

## Path parameters

- `id` string, required

## Query parameters

- `limit` number

## Response `200`

- APIRawAnalyticsEvents
  - `events` APIRawAnalyticsEvent[], required: Most-recent events first; capped by the `limit` query param.
    - `timestamp` string, required: Event timestamp (UTC, ISO 8601).
    - `eventType` string, required: `view` | `asset` | `engagement` — see worker analytics docs.
    - `path` string, required: Path the event fired on.
    - `visitorHash` string, required: Cookieless visitor identifier. Distinct values indicate distinct visitors (or, when investigating, distinct hash inputs — e.g. one of the request's IP / UA / daily salt changed).
    - `bytesServed` number, required: Bytes served for this response. 0 on beacon events.
    - `engagedMs` number, required: Engaged ms (engagement event only).
    - `sampleInterval` number, required: Adaptive-sampling weight; 1 at low volume.
    - `referrerHost` string, required: Referrer hostname (`""` direct, `"$self"` same-site).
    - `country` string, required: ISO country code from `request.cf.country`.
    - `region` string, required: Region/subdivision from `request.cf.region`.
    - `city` string, required: City from `request.cf.city`.
    - `browser` string, required: Browser family parsed from UA.
    - `os` string, required: OS family parsed from UA.
    - `deviceType` string, required: `desktop` | `mobile` | `tablet` | `""`.
    - `utmSource` string, required: `utm_source`.
    - `utmMedium` string, required: `utm_medium`.
    - `utmCampaign` string, required: `utm_campaign`.
    - `utmContent` string, required: `utm_content`.
    - `utmTerm` string, required: `utm_term`.

## Other responses

- `401`: Not authenticated
- `403`: You do not own this site
- `404`: Site not found

---

[API](https://skmtc.dev/nippy/apis/nippy-backend-api.md) · [All operations](https://skmtc.dev/nippy/apis/nippy-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nippy/apis/nippy-backend-api/revisions/7ab23f040a55?raw)
