internal Identify(string userId, Traits traits, DateTime? timestamp, ContextSegmentIO context ) : base("identify", timestamp, context) { this.UserId = userId; this.Traits = traits ?? new Traits(); }
/// <summary> /// Identifying a visitor ties all of their actions to an ID you /// recognize and records visitor traits you can segment by. /// </summary> /// /// <param name="userId">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.</param> /// /// <param name="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. } </param> /// /// <param name="timestamp"> If this event happened in the past, the timestamp /// can be used to designate when the identification happened. Careful with this one, /// if it just happened, leave it null.</param> /// <param name="context"> A dictionary with additional information thats related to the visit. /// Examples are userAgent, and IP address of the visitor. /// Feel free to pass in null if you don't have this information.</param> /// /// public void Identify(string userId, Traits traits, DateTime? timestamp, ContextSegmentIO context) { if (String.IsNullOrEmpty(userId)) throw new InvalidOperationException("Please supply a valid userId to Identify."); Identify identify = new Identify(userId, traits, timestamp, context); Enqueue(identify); }
/// <summary> /// Identifying a visitor ties all of their actions to an ID you /// recognize and records visitor traits you can segment by. /// </summary> /// /// <param name="userId">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.</param> /// /// <param name="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. } </param> /// /// <param name="timestamp"> If this event happened in the past, the timestamp /// can be used to designate when the identification happened. Careful with this one, /// if it just happened, leave it null.</param> /// public void Identify(string userId, Traits traits, DateTime? timestamp) { Identify(userId, traits, timestamp, null); }
/// <summary> /// Identifying a visitor ties all of their actions to an ID you /// recognize and records visitor traits you can segment by. /// </summary> /// /// <param name="userId">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.</param> /// /// <param name="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. } </param> /// /// <param name="context"> A dictionary with additional information thats related to the visit. /// Examples are userAgent, and IP address of the visitor. /// Feel free to pass in null if you don't have this information.</param> /// public void Identify(string userId, Traits traits, ContextSegmentIO context) { Identify(userId, traits, null, context); }
/// <summary> /// Identifying a visitor ties all of their actions to an ID you /// recognize and records visitor traits you can segment by. /// </summary> /// /// <param name="userId">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.</param> /// /// <param name="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. } </param> /// public void Identify(string userId, Traits traits) { Identify(userId, traits, null, null); }