Identify returning user interaction data from xDB in sitecore 9

329 Views Asked by At

I have a requirement to identify the returning user which haven't yet created their profile. I know that sitecore gives the unique identifier to the anonymous user based on the device and stores the information in the cookie.

But when I am trying to get the interactions data from the xConnect api using below code:

var session = Sitecore.Analytics.Tracker.Current.Session.Interaction

I am only getting the pages from the current visit of the user. Even though I am using the same device and same browser.

How do I get all the previous sessions that visitor has browsed assuming they haven't cleared their browser cookies.

0

There are 0 best solutions below