Send session data to the Sitecore CDP

Abstract

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

You can capture session data in an event that is triggered in the session, for example, a VIEW event or an ADD event. To pass session data in a custom-made deep link, place the deep link in the object.

To send session data within a VIEW event, use the following attributes:

Attribute

Description

Type

Example(s)

Required/optional

sessionData

JSON Object An object of arbitrary session data.

JSON object

N/A

Required

sessionData.attribute

One or many name/value pair attributes for custom session data.

Supported types for the value; string: "hello", boolean: true or false, integer: 9, number: 99.9

"is_logged_in":true

Optional

The following JSON example demonstrates how to send session data:

{  
   "channel":"WEB",
   "type":"VIEW",
   "language":"EN",
   "currency":"EUR",
   "page":"home page",
   "pos":"retailsite123.com",
   "browser_id":"56860bff-94ba-4d84-aa37-2b5a83d5411b",
   "sessionData":{  
      "deep_link":"https://www.retailsite123.com/search?product=shoes",
      "is_logged_in":true,
      "assistance":false
   }
}