Page opened

Learn how to track when a user opens a page.

This event tracks when a user opens a page, either by clicking a link or typing a URL in the address bar.

The key difference between this event and the Tab URL changed event is that the latter triggers when the URL changes without reloading the page, which is common in single-page applications (SPAs).

And unlike the Tab opened event, which triggers when a new tab is opened, the page opened event fires every time a page is accessed, even within the same tab.

Croct's mascot amazed
Automatically tracked

The SDK automatically tracks this event when a user accesses a page.

Input properties

This event has no input properties.

Processed properties

These properties are automatically tracked:

url
string

The URL of the page the user opened.

userAgent
string

The user-agent of the client.

preferredLanguages
set<string>

An ordered list of the user's preferred languages.

For example, ["en", "en-CA", "fr-CA"] indicates preference for English, Canadian English, and Canadian French.

referrer(optional)
string

The URL of the page that linked to the current page.

The value is null if the user accessed the page directly.

Payload examples

Below are some payload examples for this event:

1234567
{  "type": "pageOpened",  "url": "https://example.com",  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0",  "preferredLanguages": ["en-US"],  "referrer": "https://google.com"}