When logging users in, we want to use both a userid and the user's email as contact identifiers.

// Set identifiers
Tracker.Current.Session.IdentifyAs("USERID_SOURCE", "U1542658"); 
Tracker.Current.Session.IdentifyAs("EMAIL_SOURCE", "john@doe.com");

// Retrieve identifiers
var ids = Tracker.Current.Contact.Identifiers.Select(i => $"{i.Identifier} ({i.Source})"); 

ids Collection:

john@doe.com (EMAIL_SOURCE)
dc1bace105fe47a286bbbe3ed64a6169 (xDB.Tracker)
24cfef12-e6ed-4043-a99c-c45a3998135f (Alias)

Unfortunately, the ids collection now only contains the second identifier "EMAIL_SOURCE". The "USERID_SOURCE" seems to be ignored.

How can we correctly set multiple identifiers?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.