> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manalens.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Page

> Reference for the page event: a page view on your website, with the page, referrer and campaign fields.

A `page` event records one page view on a website. The [Web SDK](https://docs.manalens.dev/sdks/web.md) sends it on load and on each route change in a single-page app. Page views drive visitors, sessions, bounce rate, entry and exit pages, and acquisition.

## Send a page view

With `autoPageviews: true` (the default), you do not need to call anything. To send one by hand:

```ts theme={null}
analytics.page();
analytics.page({ section: 'pricing' }); // optional properties
```

`page()` without properties sends nothing when the path and query are the same as the last page view. With properties, it always sends.

The SDK sends a page view on the first load, when `pushState` or `replaceState` changes the path, after back and forward (when the framework has changed the title, at most 1 second later), and on a `ua:navigate` event on `window`. See [single-page apps and client routing](https://docs.manalens.dev/sdks/web.md#single-page-apps-and-client-routing) for Astro View Transitions and Next.js.

## Fields

| Field | Required | Description |
| - | - | - |
| `type` | Yes | `page` |
| `channel` | Yes | `web` |
| `context.page.url` | Yes | The page origin and path. It must be on the project domain. |
| `context.page.path` | Yes | The path. It must match the URL. A trailing slash is removed. |
| `context.page.title` | Yes | The document title, at most 300 characters |
| `context.referrer` | Yes | The document referrer. Only an external origin is kept. |
| `properties` | No | Your own flat properties |

See [common fields](https://docs.manalens.dev/data/events/common.md) for the envelope fields and the fields that the collector adds.

## What is removed

The SDK sends only the URL origin and path. It removes query strings and fragments. Only the allowlisted [campaign and click ID fields](https://docs.manalens.dev/data/what-we-collect.md#campaign-and-ad-parameters) are kept, in `context`.

## Rules

* A `page` event needs `context.page`. A game or app build cannot send `page` events: send a `track` event, such as `screen_view`, instead.
* The collector refuses the batch with `403` when the page URL is not on the project domain, one of its subdomains, or a host in the project's [allowed origins](https://docs.manalens.dev/sdks/app-events.md#allowed-origins) (for example `*.itch.zone`).
* The collector refuses the batch with `400` when `context.page.path` does not match the URL.

## Example

```json theme={null}
{
  "type": "page",
  "message_id": "9b3c0d1e-2f4a-4b5c-8d6e-7f8091a2b3c4",
  "channel": "web",
  "version": "0.1.0",
  "original_timestamp": "2026-11-09T10:00:00.000Z",
  "anonymous_id": "3f0c5c1e-8a8e-4c1b-9d7e-2b1f4e6a9c10",
  "session_id": "1762682400000",
  "context": {
    "page": { "path": "/pricing", "title": "Pricing", "url": "https://example.com/pricing" },
    "referrer": "https://www.google.com",
    "locale": "en-US"
  },
  "properties": {}
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.