Send a VIEW event to Sitecore CDP

Abstract

Provides the required attributes and a JSON example of how to send a VIEW event to Sitecore CDP (Data model 2.0).

We recommend that you send a VIEW event as the first event that you send and validate. The VIEW event is a simple but important event, because it captures the guest's action of viewing a page. You must capture VIEW events on all pages where you want to track guest behavior.

The following are typical pages where we recommend that you capture the VIEW event:

  • Home

  • Search results

  • Product description

  • Payment

  • Confirmation

  • Promotional offers

On any tagged page, your website sends a VIEW event when a user lands on the page and it fully loads.

To send a VIEW event, use the following attributes:

Attribute

Type

Description

Example(s)

Required/optional

channel

string

The channel captured on each page the guest visited.

"WEB", "MOBILE_WEB", "MOBILE_APP"

Required

type

string (uppercase)

The type of event.

"VIEW"

Required

language

string (2 letter ISO 639 language code)

The language captured on each page the guest visited.

"EN", "FR", "DE"

Required

currency

string (3 letter ISO 4217)

The type of currency.

"EUR", "USD", "GBP"

Required

page

string

The name of the web page the guest visited.

"home page", "search page" "/home", "/confirm"

Required

pos

string

Pre defined by client) The point of sale (storefront) captured on each page the guest visited.

"retailsite123.com", "myretailesite456.com"

Required

browser_id

string (UUID)

The ID of a browser generated by Sitecore CDP.

"56860bff-94ba-4d84-aa37-2b5a83d5411b"

Required

The following JSON example shows how to send a VIEW event.

{
    "channel": "WEB",
    "type": "VIEW",
    "language": "EN",
    "currency": "EUR",
    "page": "home page",
    "pos": "spinair.com",
    "browser_id": "56860bff-94ba-4d84-aa37-2b5a83d5411b"
}