View

Track user views and impressions. Understand the distinction between views and impressions, and how to implement view events for navigation, search, and product detail pages using FHR and XO.

Views are one of the most basic user actions, and are used to track impressions and product views. Views occur whenever a customer navigates to a page, such as through the product listing page, search results, or a product detail page.

Views vs impressions

The differentiation between views and impressions relates to tracking for FHR Insights exclusively.

We differentiate between views and impressions:

  • View: Occurs when a user explicitly navigates to a page; for example, landing on a PDP triggers a view event

  • Impression: Occurs when a user is passively exposed to a product; for example, a product appears on a PLP during navigation or search

Example:

  1. A user searches for a product.

  2. The product appears on the PLP. A view event is triggered that is classified as an impression.

  3. The user clicks on the product and lands on the PDP. A view is triggered.

This distinction between views and impressions allows for the calculation of the view conversion rate, which measures the proportion of impressions that lead to actual views.

View on navigation or search

Send a view event whenever a user interacts with data retrieved from Crownpeak services as a result of navigation and search. The resulting view action is treated as an impression.

For implementations with infinite scroll, each request for page data should trigger a new event. The source ID should come from the response of the triggering request.

Properties

{
    "action":"view",
    "target": {
        "pathToPage": "path/to/page"
    },
    "sourceId":"source-id",
    "metadata": {}
}
Property
Context
Description

action

All

Must be specified as "view"

target.pathToPage

All

The path of the page that has been viewed

sourceId

All

The ID that links the FHR or XO response to the event, i.e. response ID

metadata.*

All

Additional information, such as context or locale

metadata.query

The view event is triggered on search results

The search terms that generated the viewed search results

View on product

Send a view event when a user views a product detail page (PDP).

Properties

{
    "action":"view",
    "target": {
        "product":"product-id"
    },
    "sourceId":"source-id",
    "metadata": {}
}
Property
Context
Description

action

All

Must be specified as "view"

target.product

All

The ID of the viewed product

sourceId

All

The ID that links the FHR or XO response to the event, i.e. response ID

metadata.*

All

Additional information, such as context or locale

Last updated