Tracking and personalization
The content and experience provided to the visitor by the Content Delivery role can be highly personalized, and involves a number of architectural entities. For optimum scaling and configuration, a thorough understanding of these entities is important.
Using tracked data to render personalized content
When the visitor requests a page from the Content Delivery role, Sitecore personalizes the content based on metadata and rules.
Web Tracker automatically collects metadata each time the visitor interacts with a channel such as a website, an app or an email exchange. The metadata includes explicit information about the visitor and visit such as the day of the week, time of day, the pages visited, the visitor’s IP address, their device and browser identification.
Sitecore can enrich the metadata by looking up the visitor’s geographical location and information about the device from the Sitecore IP Geolocation and Device Detection services. providing that the visitor has enabled this on their device. You can further enrich the information with custom logic by reading from other services or databases.
The metadata is ultimately parsed by the rules built into the Sitecore rendering engine to personalize and present content to the visitor in various formats such as HTML, XML, JSON, or PDF. You can extend the rules to run any business logic and to rely on any data in addition to the metadata.
Storing tracked data in session state
Web Tracker stores the collected metadata in the Private Session State Store that is, by default, an ASP.NET in-process memory storage in the Content Delivery role. Sitecore also supports various other session state storage providers for different purposes.
In some scenarios, a visitor can be running multiple active sessions at the same time, for example, when interacting with your website on their computer and on their phone at the same time. In this case, the Sitecore Web Tracker stores the metadata in the Shared Session State Store as long as the sessions are active. This is to ensure that changes in one session do not overwrite changes in another session and that information in one session is available in other sessions.
Choosing the right Private and Shared Session State Store is particularly important in a scaled environment. To ensure that a visitor's experience is consistent, the same session must be maintained across all servers in the cluster. Additionally, hosting options and latency can influence which session state provider to choose.
You can configure different Sitecore roles to use different session providers based on requirements. For example, the Content Delivery role can use a database for storing sessions while the Content Management uses in-process memory or the other way around.
Persisting tracked data as identifiable contacts and interactions
If you have configured Sitecore as the Sitecore Experience Platform data flows, and not as the Sitecore Experience Manager data flows, the Sitecore Tracker can persist information on visitors and their activities on your channels as identifiable contacts and interactions. On the email channel, an interaction could be that an email was opened or that a visitor unsubscribed. On a website, interactions are the activities performed by the visitor within a session, such as visiting pages or triggering goals.
On a visitors first visit to one of your channels, Sitecore creates a contact identifier and stores it on the visitor's device and in the xDB Collection database. On following visits, Sitecore reads the identifier from the visitors device and looks up any information for the contact in the xDB Collection database. This makes it possible for Sitecore to personalize the content served to the visitor based on information gathered on past visits.
Privacy and security
Refer to the Architecture and Roles documentation for privacy and security considerations for each role on the processing and aggregation data flow.