Browser SDK

page

Record browser page views.

The Page method lets you record page views on your website, along with optional extra information about the page viewed by the user.

Because some destinations require a Page call to instantiate their libraries, you must call page() at least once per page load. You can call it more than once if needed, for example, on virtual page changes in a single page app.

Signatures#

FieldRequiredTypeDescription
categoryfalsestringThe category of the page. Useful when many pages belong to one category, such as ecommerce pages. If you pass only one string to page, it is treated as name; include name to send a category.
namefalsestringThe name of the page.
propertiesfalseobjectA dictionary of page properties. Ferno automatically collects the URL, title, referrer, and path. The URL defaults to a canonical URL when available and falls back to document.location.href.
optionsfalseobjectA dictionary of call options, such as enabling or disabling specific destinations. If you omit properties, pass an empty object before options.
callbackfalsefunctionRuns after a 300 ms timeout, giving the browser time to make outbound requests. It might not execute if a device-mode library is blocked from loading.

Use manual page calls for route changes that automatic navigation does not cover. Do not put query-string secrets, user-entered search text, or sensitive page content in properties.

Default page properties Ferno adds properties to each Page call.

Ferno adds the following information:

The page resolver also accepts page(properties), page(name, properties), and page(category, name, properties, options, callback).