Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • Stream API
  • Sitecore Engage SDK reference
  • Objects
  • Event data object
  • VIEW event

VIEW event

The event data object for a VIEW event must include all the required attributes for event data objects. No further attributes are required. The object can optionally include the following attributes:

Attribute

Type

Description

Example

pageVariantId

string

The ID of a personalized page variant.

"page_variant_3"

After you create this event data object, you can optionally extend this event using the extension data object. Then, you can send the event using the Engage.pageView() function.

Example 23. VIEW event

Here's an example of the event data object for a VIEW event.

RequestResponse
const eventData = {
    channel: "WEB",
    currency: "EUR",
    pointOfSale: "myretailsite/ireland",
    language: "EN",
    page: "home",
    pageVariantId: "page_variant_3"
}


Example 24. VIEW event with UTM parameters

Here's an example of an event data object for a VIEW event that is sent to Sitecore CDP with UTM parameters included. By default, the VIEW event data object includes UTM parameters. You can exclude UTM parameters from the VIEW event data object by setting the value for includeUTMParameters to false in the settings object.

When a VIEW event triggers, the event data includes all the UTM parameters that are in the URL:

RequestResponse
{ 
    { ... } 
    "utm_source":"newsletter",
    "utm_medium":"email",
    "utm_campaign":"summer_sale",
    "utm_term":"running shoes"
}


Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore