Storing visitor information in xDB contacts

All visitors are stored in xDB, including anonymous visitors. It allow us to store information such as personal details, e-mail addresses, addresses, phone numbers, and so on in the Contact entity in xDB.

In this recipe, you will learn how to store user profile information in xDB contacts at the time of user signup using out-of-the-box System and Standard contact facets.

Getting ready

This recipe assumes that you have created a sign-up sublayout or rendering, which collects details such as username (e-mail address), password, phone number, full address, birthdate, and so on.

How to do it…

We will first prepare a helper method from where we can store user information in xDB:

  1. In the SitecoreCookbook project, ...

Get Sitecore Cookbook for Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.