-
-
Save islaytitans/cc7b9704d104539d9f82 to your computer and use it in GitHub Desktop.
Setting the identifier of a Contact programmatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the Contact in session | |
var contact = Tracker.Current.Session.Contact; | |
// Set the Contact's identification level to known if not already set | |
if (contact.Identifiers.IdentificationLevel != ContactIdentificationLevel.Known) | |
contact.Identifiers.IdentificationLevel = ContactIdentificationLevel.Known; | |
// Set the Email address entered into the form as the Identifier of the Contact | |
contact.Identifiers.Identifier = OrderFormModel.EmailAddress; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment