1. Interactions

Page events

Version:

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 objectProperty on event object
Data from source objectData
Data from source objectDataKey
DataKey from source objectEngagementValue
Value from source objectItemId
ItemId from source objectText
Text from source objectTimestamp

Campaign events

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

Source objectMember of the array located at PageEvents on the page from the interaction
Event mapping definitionEvent Mappings for MongoDB Page Events > Campaign Event
Event object typeSitecore.XConnect.Collection.Model.CampaignEvent
ConditionsPageEventDefinitionId on source object is {F358D040-256F-4FC6-B2A1-739ACA2B2983}
Field mapping definitionMongoDB 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 objectProperty on event object
Data from source objectCampaignDefinitionId

Download events

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

Source objectMember of the array located at PageEvents on the page from the interaction
Event mapping definitionEvent Mappings for MongoDB Page Events > Download Event
Event object typeSitecore.XConnect.Collection.Model.DownloadEvent
ConditionsPageEventDefinitionId on source object is {FA72E131-3CFD-481C-8E15-04496E9586DC}
Field mapping definitionMongoDB 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 objectProperty on event object
PageEventDefinitionId from source objectDefinitionId

Goal events

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

Source objectMember of the array located at PageEvents on the page from the interaction
Event mapping definitionEvent Mappings for MongoDB Page Events > Goal Event
Event object typeSitecore.XConnect.Goal
ConditionsIsGoal on source object is truePageEventDefinitionId is not {BFC9EB31-1D02-486B-A3A0-5B36A138CCF7}PageEventDefinitionId is not {E97E9557-0B84-4103-B545-988BF7336C7C}
Field mapping definitionMongoDB 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 objectProperty on event object
PageEventDefinitionId from source objectDefinitionId

Search events

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

Source objectMember of the array located at PageEvents on the page from the interaction
Event mapping definitionEvent Mappings for MongoDB Page Events > Search Event
Event object typeSitecore.XConnect.Collection.Model.SearchEvent
ConditionsPageEventDefinitionId on source object is {0C179613-2073-41AB-992E-027D03D523BF}
Field mapping definitionMongoDB 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 objectProperty on event object
Keywords from source objectKeywords

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 objectMember of the array located at PageEvents on the page from the interaction
Event mapping definitionEvent Mappings for MongoDB Page Events > General Event
Event object typeSitecore.XConnect.Event
ConditionsPageEventDefinitionId on source object is not {DC6F6AFF-6AA9-423F-A824-49F9EE741AA9}
Field mapping definitionMongoDB 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 objectProperty on event object
PageEventDefinitionId from source objectDefinitionId
If you have suggestions for improving this article, let us know!