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.
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.
We will first prepare a helper method from where we can store user information in xDB:
In the
SitecoreCookbook
project, create aContactHelper
class in theHelper
subfolder in theAnalytics
folder. Create aSaveContact()
method as follows. For this, you first need to reference theSitecore.Analytics.Model
assembly to the project:public static void SaveContact(string...