public Identify ( string userId, |
||
userId | string | The visitor's identifier after they log in, or you know /// who they are. By /// explicitly identifying a user, you tie all of their actions to their identity. |
traits | A dictionary with keys like "email", "name", “subscriptionPlan” or /// "friendCount”. You can segment your users by any trait you record. /// Pass in values in key-value format. String key, then its value /// { String, Integer, Boolean, Double, or Date are acceptable types for a value. } | |
return | void |
public static void Identify(Client client) { client.Identify(userId, new Traits() { { "Subscription Plan", "Free" }, { "Friends", 30 }, { "Joined", DateTime.Now }, { "Cool", true }, { "Company", new Props() { { "name", "Initech, Inc " } } }, { "Revenue", 40.32 }, { "Don't Submit This, Kids", new UnauthorizedAccessException() } }, new DateTime(), new Context() .SetIp("12.212.12.49") .SetLanguage("en-us") .SetProviders(new Providers() { { "all", false }, { "Mixpanel", true }, { "Salesforce", true } }) ); }