LogoLogo
Support
Front End Tracking
Front End Tracking
  • Introduction to front-end tracking
  • Setup guide
    • Prerequisites
    • FHR activities
    • XO Search activities
    • XO Recommendations activities
  • Implementation guide
    • SDK
    • Google Tag Manager
    • REST API
  • Identities
    • User object
    • Working with identities
  • Activities
    • Activity object
    • View
    • Click
    • Add to cart
    • Remove from cart
    • Purchase
    • Custom actions
  • AI Scores
    • Setup
    • Usage
  • Best practice
  • Data handling
  • Acronyms and abbreviations
Powered by GitBook

Copyright @ 2024 Crownpeak Technology, Inc. All rights reserved.

On this page
  • Views vs impressions
  • View on navigation or search
  • Properties
  • View on product
  • Properties
  1. Activities

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.

PreviousActivity objectNextClick

Last updated 3 months ago

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.

  • (FHR and XO)

  • (FHR and XO)

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 triggers a view event

  • Impression: Occurs when a user is passively exposed to a product; for example, a product appears on a 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 .

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

The target.page field has been deprecated in favor of target.pathToPage.

For future insights, ensure you are using the most up to date property names.

View on product

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

You should only include a source ID if the page the event is triggered on is powered by FHR or XO.

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

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

PDP
PLP
View on a navigation or search result page
View on a product
impression
PDP
infinite scroll