Page Events

Format in Sitecore 8.x

In Sitecore 8.x, the page events for a specific page are captured on the page in the property PageEvents.

The following is an example of a page with the PageEvents property:

{
    "DateTime" : ISODate("2018-01-01T12:00:00.000Z"),
    "Duration" : 60,
    "Item" : {
        "_id" : NUUID("506dd1a2-2150-4062-abb8-e029d28af870"),
        "Language" : "en",
        "Version" : 1
    },
    "PageEvents" : [
        {
            "Name" : "Error",
            "ItemId" : NUUID("506dd1a2-2150-4062-abb8-e029d28af870"),
            "Timestamp" : 0,
            "DataKey" : "Presentation error: Data source isn't set or have wrong template...",
            "Text" : "Presentation error: Data source isn't set or have wrong template...",
            "PageEventDefinitionId" : NUUID("c8bf254a-9ccc-4e16-9009-82b7cd33e4be"),
            "DateTime" : ISODate("2018-01-01T12:00:00.000Z"),
            "Value" : 0
        }
    ],
}

Format in Sitecore 9

In Sitecore 9, all events associated with an interaction are stored directly on the interaction. The events are stored in a property named Events.

Understanding Page Event Mapping

Rules are used to determine how to convert a Sitecore 8.x page event to a Sitecore 9 event. These rules are called event mapping definitions. Event mapping definitions are configured in Sitecore under the following item:

Tenant Settings > Providers > xConnect > XObject Mapping Settings > XObject Mapping Definitions > Event Mappings for MongoDB Page Events

Each event mapping definition has several components:

  1. Event object type - This object type is used to store the event data. The type inherits from Sitecore.XConnect.Event.
  2. Conditions - Determines whether the mapping definition is appropriate for the page event, usually by checking the page event definition id. The mapping definition is only used if all of the selected conditions are true.
  3. Field mapping set - The mappings in the specified mapping set are used populate the properties on the event object.

Important

Each page event has a property ParentEventId. This property is used to associate the page event with the page view event.

This property is set to the page view event that is created in Sitecore 9, but it is not a mapped value. Mapping is only used for values that come from outside of Sitecore 9.

Common Page Event Mappings

All page events described on this page include the following mappings:

Value to write to event object Property on event object
Data from source object Data
Data from source object DataKey
DataKey from source object EngagementValue
Value from source object ItemId
ItemId from source object Text
Text from source object Timestamp

Campaign Events

This section describes how campaign events are mapped from Sitecore 8.x to 9.

Source object Member of the array located at PageEvents on the page from the interaction
Event mapping definition Event Mappings for MongoDB Page Events > Campaign Event
Event object type Sitecore.XConnect.Collection.Model.CampaignEvent
Conditions PageEventDefinitionId on source object is {F358D040-256F-4FC6-B2A1-739ACA2B2983}
Field mapping definition MongoDB to xConnect Event Mappings > MongoDB Page Event to xConnect Campaign Event

In addition to the common mappings that apply to all page events, the following event properties are also mapped:

Value to write to event object Property on event object
Data from source object CampaignDefinitionId

Download Events

This section describes how download events are mapped from Sitecore 8.x to 9.

Source object Member of the array located at PageEvents on the page from the interaction
Event mapping definition Event Mappings for MongoDB Page Events > Download Event
Event object type Sitecore.XConnect.Collection.Model.DownloadEvent
Conditions PageEventDefinitionId on source object is {FA72E131-3CFD-481C-8E15-04496E9586DC}
Field mapping definition MongoDB to xConnect Event Mappings > MongoDB Page Event to xConnect Event

In addition to the common mappings that apply to all page events, the following event properties are also mapped:

Value to write to event object Property on event object
PageEventDefinitionId from source object DefinitionId

Goal Events

This section describes how goal events are mapped from Sitecore 8.x to 9.

Source object Member of the array located at PageEvents on the page from the interaction
Event mapping definition Event Mappings for MongoDB Page Events > Goal Event
Event object type Sitecore.XConnect.Goal
Conditions
  1. IsGoal on source object is true
  2. PageEventDefinitionId is not {BFC9EB31-1D02-486B-A3A0-5B36A138CCF7}
  3. PageEventDefinitionId is not {E97E9557-0B84-4103-B545-988BF7336C7C}
Field mapping definition MongoDB to xConnect Event Mappings > MongoDB Page Event to xConnect Event

In addition to the common mappings that apply to all page events, the following event properties are also mapped:

Value to write to event object Property on event object
PageEventDefinitionId from source object DefinitionId

Search Events

This section describes how search events are mapped from Sitecore 8.x to 9.

Source object Member of the array located at PageEvents on the page from the interaction
Event mapping definition Event Mappings for MongoDB Page Events > Search Event
Event object type Sitecore.XConnect.Collection.Model.SearchEvent
Conditions PageEventDefinitionId on source object is {0C179613-2073-41AB-992E-027D03D523BF}
Field mapping definition MongoDB to xConnect Event Mappings > MongoDB Page Event to xConnect Search Event

In addition to the common mappings that apply to all page events, the following event properties are also mapped:

Value to write to event object Property on event object
Keywords from source object Keywords

General Events

This section describes how general events are mapped from Sitecore 8.x to 9. A general event is any event is not matched to a specific event type.

Source object Member of the array located at PageEvents on the page from the interaction
Event mapping definition Event Mappings for MongoDB Page Events > General Event
Event object type Sitecore.XConnect.Event
Conditions PageEventDefinitionId on source object is not {DC6F6AFF-6AA9-423F-A824-49F9EE741AA9}
Field mapping definition MongoDB to xConnect Event Mappings > MongoDB Page Event to xConnect Event

Note

If there is a specific event that you do not want to migrate, the exclude condition can be configured on the event mapping definition. This is how the event long running operation is excluded from the migration process.

In addition to the common mappings that apply to all page events, the following event properties are also mapped:

Value to write to event object Property on event object
PageEventDefinitionId from source object DefinitionId