상속: Props
예제 #1
0
        internal Track(string userId, 
		               string eventName,
            		   Properties properties, 
		               DateTime? timestamp,
		               Context context)

            : base(timestamp, context)
        {
			this.UserId = userId;
            this.EventName = eventName;
            this.Properties = properties ?? new Properties();
        }
예제 #2
0
        internal Track(string id,
                       bool anonymous,
		               string eventName,
            		   Properties properties,
		               DateTime? timestamp,
                   ContextSegmentIO context)
            : base("track", timestamp, context)
        {
            if (anonymous) {
                this.AnonymousId = id;
            } else {
                this.UserId = id;
            }

            this.EventName = eventName;
            this.Properties = properties ?? new Properties();
        }
예제 #3
0
        /// <summary>
        /// Whenever a user triggers an event on your site, you’ll want to track it
        /// so that you can analyze and segment by those events later.
        /// </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.
        /// This makes it possible for you to run things like segment-based email campaigns.</param>
        ///
        /// <param name="eventName">The event name you are tracking. It is recommended
        /// that it is in human readable form. For example, "Bought T-Shirt"
        /// or "Started an exercise"</param>
        ///
        /// <param name="properties"> A dictionary with items that describe the event
        /// in more detail. This argument is optional, but highly recommended —
        /// you’ll find these properties extremely useful later.</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 Track(string id, bool anonymous, string eventName, Properties properties,
              DateTime? timestamp, ContextSegmentIO context )
        {
            if (String.IsNullOrEmpty(id))
                throw new InvalidOperationException("Please supply a valid userId to Track.");

            if (String.IsNullOrEmpty(eventName))
                throw new InvalidOperationException("Please supply a valid eventName to Track.");

            Track track = new Track(id, anonymous, eventName, properties, timestamp, context);

            Enqueue(track);
        }
예제 #4
0
 /// <summary>
 /// Whenever a user triggers an event on your site, you’ll want to track it
 /// so that you can analyze and segment by those events later.
 /// </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.
 /// This makes it possible for you to run things like segment-based email campaigns.</param>
 ///
 /// <param name="eventName">The event name you are tracking. It is recommended
 /// that it is in human readable form. For example, "Bought T-Shirt"
 /// or "Started an exercise"</param>
 ///
 /// <param name="properties"> A dictionary with items that describe the event
 /// in more detail. This argument is optional, but highly recommended —
 /// you’ll find these properties extremely useful later.</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>
 ///
 /// <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 Track(string id, bool anonymous, string eventName, Properties properties,
               DateTime? timestamp )
 {
     Track(id, anonymous, eventName, properties, timestamp, null);
 }
예제 #5
0
 /// <summary>
 /// Whenever a user triggers an event on your site, you’ll want to track it.
 /// </summary>
 ///
 /// <param name="userId">The visitor's identifier after they log in, or you know
 /// who they are. </param>
 ///
 /// <param name="eventName">The event name you are tracking. It is recommended
 /// that it is in human readable form. For example, "Bought T-Shirt"
 /// or "Started an exercise"</param>
 ///
 /// <param name="properties"> A dictionary with items that describe the event
 /// in more detail. This argument is optional, but highly recommended —
 /// you’ll find these properties extremely useful later.</param>
 ///
 public void Track(string id, bool anonymous, string eventName, Properties properties)
 {
     Track(id, anonymous, eventName, properties, null, null);
 }
예제 #6
0
 /// <summary>
 /// Whenever a user triggers an event on your site, you’ll want to track it
 /// so that you can analyze and segment by those events later.
 /// </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.
 /// This makes it possible for you to run things like segment-based email campaigns.</param>
 ///
 /// <param name="eventName">The event name you are tracking. It is recommended
 /// that it is in human readable form. For example, "Bought T-Shirt"
 /// or "Started an exercise"</param>
 ///
 /// <param name="properties"> A dictionary with items that describe the event
 /// in more detail. This argument is optional, but highly recommended —
 /// you’ll find these properties extremely useful later.</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>
 ///
 /// <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 Track(string userId, string eventName, Properties properties,
    DateTime? timestamp)
 {
     Track(userId, eventName, properties, timestamp, null);
 }
예제 #7
0
 /// <summary>
 /// Whenever a user triggers an event on your site, you’ll want to track it.
 /// </summary>
 ///
 /// <param name="userId">The visitor's identifier after they log in, or you know
 /// who they are. </param>
 ///
 /// <param name="eventName">The event name you are tracking. It is recommended
 /// that it is in human readable form. For example, "Bought T-Shirt"
 /// or "Started an exercise"</param>
 ///
 /// <param name="properties"> A dictionary with items that describe the event
 /// in more detail. This argument is optional, but highly recommended —
 /// you’ll find these properties extremely useful later.</param>
 ///
 public void Track(string userId, string eventName, Properties properties)
 {
     Track(userId, eventName, properties, null, null);
 }