I am developing a function to support tracking user behavior through a mobile app.
Below is the current scenario:
Case 1: Anonymous User 1 - Working fine:
Anonymous user visits the page, then these histories (interactions) are stored into xdb for anonymous user 1.
When user logs in, Anonymous user 1 is loaded and assigned to the current session by ContactManager factory.
After that, it will call IdentifyAs() method Identifying to know contact: userlogin
(Sitecore.Analytics.Tracker.Current.Session.IdentifyAs("mysource", > userlogin )
Result: For this case, it is running as per our expectation: all interactions and every new interaction of anonymous user 1 will be shown on userlogin
Case 2: Anonymous User 2/New Anonymous User - Not working fine:
A new anonymous user visits the page, then these histories (interactions) are stored into xdb for Anonymous user 2.
When user logs in, Anonymous user 2 is loaded and assigned to the current session by ContactManager factory.
After that, it will call IdentifyAs() method Identifying to know contact: userlogin
(Sitecore.Analytics.Tracker.Current.Session.IdentifyAs("mysource", userlogin )
Result: For this case, all interactions of anonymous user 2 are shown on userlogin but new interaction for Anonymous user 2 won't be shown on userlogin
My expectation is every new interaction of anonymous user 1 will be shown on userlogin too.
Any suggestion for case 2 ? (My expectation is every new interaction of anonymous user 2 will be shown on userlogin too.)
userlogin
, but that might not happen right away, to know if the merge was triggered or not, look at theMergeInfo
facet in the Anonymous contact, if you can find it = the merge happen, if you can't find it = the merge didn't happen yet doc.sitecore.com/developers/93/sitecore-experience-platform/en/… Hope this helps