상속: Props
예제 #1
0
        internal Identify(string userId,
		                  Traits traits, 
		                  DateTime? timestamp,
                      ContextSegmentIO context
                      )
            : base("identify", timestamp, context)
        {
            this.UserId = userId;
            this.Traits = traits ?? new Traits();
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <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);
 }
예제 #5
0
 /// <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);
 }