Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Introduction to Sitecore CDP
Data availability
Managing your account
Managing system settings
Managing guests
Batch segmentation
Data browser
Audience export
Dashboards
Developer center
AI in CDP
Glossary
  • Sitecore CDP
  • Developer center
  • Session traits

Session traits

Sitecore CDP allows you to create session traits that aggregate events from a customer's web session, perform calculations at the end of the web session, and store the results as a session trait attribute in the guest profile.

Session traits can be leveraged within Sitecore CDP to:

  • Segment your audience - group customers with high purchase intent on a product category or those who have ordered a specific number of products recently, enabling more targeted marketing.

  • Create audiences - use session traits as one of the criteria in audience creation, export the session trait values, and activate audiences outside Sitecore CDP.

  • Standardize calculation and storage of values - automatically calculate session traits at the end of each customer's web session and persist these values. This eliminates the need for repeated calculations and enables consistent reuse within Sitecore CDP.

Additionally, with Sitecore Personalize, session traits can be leveraged to:

  • Personalize experiences - display relevant content or products based on customers' past behavior or preferences. For instance, promote items that have been previously viewed or liked, and hide promotions that have been dismissed to avoid repetitive actions.

  • Facilitate decision making - create decision models based on a customers' past interactions to return the next best actions or offers. For instance, displaying merchandise available in the customer's size and favorite brands, to increase the chance of conversion.

Using JavaScript, you can write the logic needed to capture calculated attributes and persist these values for identified customers. This data can include any information relevant to the customer's session, but should not store any legally binding information such as consent. For example, you can define a session trait that captures specific data from web session events or calculates values based on event attributes and data available in the guest profile. This approach allows you to capture and organize a customer's behavioral data over time, such as:

  • User preferences - language, accessibility options, notification settings, clothing or shoe size.

  • Activities - last page visited, liked items, checked out items.

  • Lists - product categories viewed, top brands purchased, items added to cart.

  • One-time actions - completed forms, dismissed popups or offers, surveys answered.

  • Calculated metrics - number of cart views, most frequently viewed brand, total time spent on the website.

After you activate a session trait, it is immediately available for use in Sitecore CDP across all customer web sessions. Calculations are only performed at the end of each session, regardless of whether the customer manually closes the session or if it times out. The calculated data remains available in their guest profile for future use. You can also view this data in guest properties.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore