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

# Wendung.page(): Record a pageview for the current URL

> Queue a pageview for the current page. Only needed when trackPageviews is off or your router bypasses the history API.

Call `Wendung.page()` to record a pageview for the current URL. With `trackPageviews: true` or `'auto'` in [`init()`](/api-reference/init) the SDK calls it for you on the initial load and on every `pushState`, `replaceState`, and `popstate`, so most apps never call it directly. Use it when tracking is off and you want to record specific pages, or when your router changes the URL without the history API.

With granted consent, the first pageview of a page load carries `document.referrer`. Every later pageview carries the previous pageview's URL as its referrer, so entry pages and internal navigation are told apart in reports.

While consent is pending, `page()` records an aggregate pageview only with `trackPageviews: 'auto'`. It omits identifiers, query parameters, fragments, title, and screen size, and restricts referrers to their origin. Otherwise pending or denied consent drops the call.

Throws if called before [`init()`](/api-reference/init).

```typescript theme={null}
Wendung.page(): void
```

## Parameters

None. The SDK reads the page context at call time. The fields depend on the consent state, as described above.

## Returns

`void`

## Examples

### Manual pageviews with tracking off

```typescript theme={null}
Wendung.init({ apiKey: 'pk_your_publishable_key' })

router.afterEach(() => {
  Wendung.page()
})
```

### A router that bypasses the history API

```typescript theme={null}
Wendung.init({ apiKey: 'pk_your_publishable_key', trackPageviews: true })

customRouter.on('navigate', () => {
  Wendung.page()
})
```

<Note>
  Each collected pageview queues one `$pageview` event that counts against your monthly pageview allowance. Calling `page()` on a navigation the SDK already observed records the page twice.
</Note>


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