Unlock Deeper Insights and Personalization with Sitecore’s New Session Traits
Sitecore's Customer Data Platform (CDP) now includes Session Traits, an effective method for improving audience segmentation, personalization, and decision-making. This feature streamlines the usage of customer data for tailored experiences and marketing tactics by enabling companies to compile events and customer data across web sessions, carry out custom computations, and save the findings within visitor profiles.
Session Traits: What Are They?
Session features are characteristics that are obtained from a customer's actions during a single online session. They give businesses the ability to record behavioral data in real time, such how many pages are browsed or how many goods are placed to a basket. Custom session attributes can be defined to compute significant metrics at the conclusion of each session using logic based on JavaScript. To help businesses customize future experiences, a trait may, for instance, track the number of times a particular product category was seen or record if a promotion was rejected.
Important Use Cases for Session Traits
- Improved Segmentation: Companies can classify clients according to their actions, such as determining which users are most likely to make a purchase or which ones are most likely to peruse a specific category. Audience segmentation becomes more dynamic and focused with this capacity.
- Creation and Export of Audiences: Custom audiences can be made using session characteristics, and these audiences can be exported and activated for specific campaigns inside and outside of Sitecore CDP.
- Personalized Customer Journeys: By filtering promotions that the user has already rejected or displaying just previously liked things, session attributes enable businesses to present the most pertinent offers and content. As a result, user interactions become more relevant and unique.
- Data Standardization: Businesses can guarantee uniformity in the tracking and utilization of values across campaigns by automating the computation and archiving of session data. This reduces manual interventions and enhances data dependability.
Let’s Create a Session Trait
In order to create a session trait, we must have access to the Developer center navigation item. Clicking Session traits will take us to the area where we can see existing and create new Session traits.
Once there, let’s create a new session trait and give it a simple name.
Now we’ve been taken to a more familiar screen. On the left, we can add our JavaScript logic that will be used to calculate and assign the session trait. And one the right we can Activate it (there by making it active) and add or modify additional details about the session trait and how it might be used.
Example: Tracking Engagement with Promotions
Imagine a retail website that wants to track how many promotional banners a customer interacts with during their session. You could define a session trait like this:
(function () {
var promotionEngagementCount = 0;
// Check for promotion interactions
triggerSession.events.forEach(event => {
if (event.type === "CLICK" && event.arbitraryData.bannerType === "Promo") {
promotionEngagementCount++; // Increment for each engagement
}
});
return promotionEngagementCount; // Return total engagements with promotions
})();
This code counts how many times promotional banners were clicked in a session. When activated, this session trait provides insights into user engagement and can inform marketing strategies.
With this in place, at the end of the user’s session, the engagements are totaled and summarized for that user. At most, we can have 10 session traits active at any one time.
Storing Session Traits
Once defined, session traits are stored in the guest’s profile as attributes. Here’s how the data might look:
{
"email": "[email protected]",
"guestType": "customer",
....
"traits": {
"session": {
"promotion_clicks": {
"name": "Count of Promotion Banner Clicks",
"createdAt": "2024-02-07T09:21:57.764Z",
"value": 5,
"modifiedAt": "2024-02-07T09:24:13.295Z"
}
}
}
}
Using session traits to track promotional banner engagement not only enhances your understanding of customer interactions but also informs data-driven marketing strategies.