mongodbsitecoresitecore8sitecore-xdb

Sitecore 8 MongoDB Identifying visitor issue


I'm using MongoDB to track user preferences (custom facet) and it works fine if I first identify the user. However if I start a new session and save the current user preferences and just after identity the user (using the email address), those preferences are not being saved against the identified user. Any thoughts?

Example (working):

  1. I start navigating the website and I login with the email address;
  2. Save user preferences;
  3. All the preferences are saved in my profile.

Example (not-working):

  1. I navigate the website without login in;
  2. Save user preferences against current visitor; At this point everything looks fine in the MongoDB;
  3. Then I login with the same email address;
  4. User preferences were not updated.

Solution

  • When using custom facets you have to make sure they are included in the contact merging process, otherwise when the user is identified the data will not get pulled across to the identified contact.

    See this on the docs on how to implement a processor to add your custom facets into the merge process.

    https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/xdb/contacts/merge_contacts