The table below summarizes the server-side events tracked by the DEC connector out-of-the-box. You can use the events classes and their handler classes to extend or override the default events. All data is reported via the DEC .NET SDK. For more information, see .NET SDK: Capture server-side data and extend DEC.
You can extend its core list of tracked events by creating your custom event handler – it is as simple as composing the contents of the request that you send to DEC. In the context of the DEC connector, this request is not considered the structure of the HTTP request but more specifically, the structure of the data you send to DEC.
In the sections below, you can see in details how to create your own data collection handlers, depending on the version of Sitefinity CMS you are working with.
The sample code below demonstrates how to create a custom handler that reports data to DEC when a new user is created in Sitefinity CMS:
Where <T> is the type of Sitefinity CMS event that implements the IEvent interface.
The sample code below demonstrates how to create a custom handler that reports data to DEC when a new account is created in Sitefinity CMS:
To customize the out-of-the-box data collection, you simply need to create a custom handler in the SitefinityWebApp project, which inherits from the handler responsible for the event you wish to modify. You need to:
For a comprehensive list of available handler classes you can check the list in the beginning of this article or navigate to Administration » Settings » Advanced » DigitalExperienceCloudConnector » ServerHandlers.
The code sample below demonstrates how to modify the data sent to DEC once a form is submitted:
Customizing the out-of-the box handlers in older versions of Sitefinity CMS is similar to the newer versions, with the only difference being that you will need to know which handler to inherit and consequently, which method to override in your new class:
Next, you register your new handler class in the appropriate section under Administration » Settings » Advanced » DigitalExperienceCloudConnector:
Note that some out-of-the-box handlers, for example, LoginMappingHandler and UserCreatedTrackingHandler are internal and cannot be customized.
The sample code below demonstrates how to override the handler for submitting a form:
You can access and instantiate all of the DEC .NET SDK clients within your SitefinityWebApp project, just like you would outside of the project. For more information, see Data collection clients.
When working with the .NET SDK clients in the context of Sitefinity CMS, it is important to make sure that you use the same settings that the DEC connector uses:
The following sections provide you with recommendation about how to work with the .NET SDK, depending on the version of Sitefinity you have.
We recommend using the InteractionManager class for data collection since it guarantees that data is reported using the DEC connector settings.
The following table lists the key properties and methods of the InteractionManager class.
Returns the most appropriate subject with which to report your data, based on the following criteria:
The following code example demonstrates how to get an instance of the InteractionManager class and send an interaction with it:
If you want to use some of the DEC .NET SDK clients that need authentication, for example the Personalization clients or A/B test clients, we recommend using the IDataIntelligenceConnectorConfigWrapper interface and the InteractionManager class to make sure that you are using the same settings as the DEC connector.
The following table lists the key properties in the IDataIntelligenceConnectorConfigWrapper.
The URL of the DEC API Server the DEC connector reports data to.
IMPORTANT: You use this property when working with Sitefinity CMS 9.2 and older.
Returns the API Key of the DEC data center with which the DEC connector is set up with.
IMPORTANT: You use this property when working with Sitefinity CMS 10.0 and newer.
The following code example demonstrates how to obtain:
We recommend using the SentenceManager, SubjectMetadataManager, and SubjectMappingManager classes. The following tables looks into details into each class and its properties and methods.
Sends a single sentence to the DEC API server.
Following is a code example that demonstrates how to obtain and use the SentenceManager, SubjectMetadataManager, and SubjectMappingManager classes.
If you want to use some of the DEC .NET SDK clients that need authentication, for example Personalization clients, we recommend using the DataIntelligenceConnectorConfigWrapper and the SentenceManager classes to make sure you are using the same settings as the DEC connector. The DataIntelligenceConnectorConfigWrapper is described in more details in the Sitefinity 10.0 and newer section of this article.
The following code sample demonstrates how to properly obtain and list the DEC personas the current user browsing your website is associated to.
Back To Top