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 |
---|---|---|---|
|
string |
The ID of a personalized page variant. |
|
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.
Here's an example of the event data object for a VIEW event.
const eventData = {
channel: "WEB",
currency: "EUR",
pointOfSale: "myretailsite/ireland",
language: "EN",
page: "home",
pageVariantId: "page_variant_3"
}
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:
{
{ ... }
"utm_source":"newsletter",
"utm_medium":"email",
"utm_campaign":"summer_sale",
"utm_term":"running shoes"
}