0

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.)

3
  • If I open an incognito chrome, visit page 1, then get identifiedAs("userLogin"), then visit page 2. In my xConnect for userLogin will be page1 and page2 on my contact. If I open a new incognito and visit page 3, then get identifiedAs("userLogin"), then visit page 4. On my xConnect for userLogin will be a 2nd visit with page3 and page4 on it. And one "merged" identifier in my list of identifiers.
    – Chris Auer
    Nov 24 '20 at 18:31
  • @ChrisAuer nope, my situation is for Mobile app I added new interaction for Mobile app via Sitecore Univeral Tracker Nov 25 '20 at 4:35
  • When you call identifyAs() sitecore will merge the Anonymous contact with the known one, in your case userlogin, but that might not happen right away, to know if the merge was triggered or not, look at the MergeInfo 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 Dec 2 '20 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.