I'm looking for a process to handle multiple users logging into the same device. If we call IdentifyAs() on authentication, the next time this is called on the same browser, it will merge the contacts. What is a graceful way to handle ending the current analytics session and starting a new one? I've considered clearing the SC_ANALYTICS_GLOBAL_COOKIE on logout but this isn't ideal because the next request on the device will be a new contact, even if that person isn't actually a different person.
-
Where you able to solve this issue in Sitecore 9.3? We are seeing this issue for multiple user in the same browser tab / session. Any advise how to solve the problem.– sc_consultantJul 25, 2022 at 6:03
-
@sc_consultant I still haven't found a neat solution for this. One theory is on login, to detect if the user is different, if so clear the cookies, then call the start tracking pipeline to recreate the cookie.– Mark GibbonsJul 26, 2022 at 5:20
1 Answer
It should work this way out of the box if you call IdentifyAs and the current contact is known one: https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-platform/identifying-contacts.html
Could you please let me know if it works differently for you?