Skip to content

Instantly share code, notes, and snippets.

@islaytitans

islaytitans/SetIdentifier.cs Secret

Last active Jan 17, 2016
Embed
What would you like to do?
Setting the identifier of a Contact programmatically
// 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