In this episode of Diving into Sitecore Analytics, we’re going to gain insights into our (currently) anonymous audience. We’ll create segments based on content interest (Content Profiling) and we will look into identifying individual users based on unique identifiers.
These two powerful concepts – built in to the Sitecore Experience Platform – provide a huge advantage over classic analytics tools like Google Analytics.
The tool I used in the video is called xConnectHelper and is available on Github.
Code to identify contacts
To identify contacts and set contact facets, you can use the ContactRepository and TrackingService classes below for reference.
Important: Before identifying an anonymous visitor, make sure that the user has given consent to do so in compliance with applicaple data protection regulations (i.E. GDPR)