Skip to main content
POST
cURL

Overview

Send a page event when a visitor views a page on your website or application. Include the page URL and title so the visit has useful context in Unify.

Examples

Set UNIFY_WRITE_KEY to the event source’s write key and use an allowed origin in the Origin header. Replace the example visitor ID and timestamp with those from the actual event. See Analytics authentication for setup.
Keep visitorId consistent across events from the same visitor. When their identity becomes known, send an identify event with that visitor ID and their email address.

Authorizations

X-Write-Key
string
header
required

Use the event source’s write key. Requests also require an allowed Origin header.

Headers

Origin
string<uri>
required

Website or application origin allowed for the event source. Required for browser and server-side requests.

Body

application/json

A page view event represents a client visiting a page on a website.

type
enum<string>
required

The type of analytics event being sent.

Available options:
page
visitorId
string
required

Unique identifier for the visitor that triggered this event.

timestamp
string<date-time>
required

Timestamp of the event (in UTC).

context
object
required

Contextual information about the client behind the event.

sessionId
string

Unique identifier for the session in which this event occurred.

sentAt
string<date-time>

Timestamp at which the request was sent (in UTC). May differ from the event timestamp if sending was delayed.

name
string

Name of the page that was viewed.

properties
object

Details about the page that was viewed.

Response

The request has succeeded.