UrchinTracker coordinates the tracking of IUrchinActivity with the environment, session and sender.
 /// <summary>
 /// Create a new AnalyticsClient with a given configuration, session, environment and URI sender.
 /// </summary>
 /// <param name="configuration">Configuration of this Google Analytics client.</param>
 /// <param name="sessionManager">Session manager with Visitor and session information.</param>
 /// <param name="environment">Provider of environmental information such as screen resolution.</param>
 /// <param name="sender">Action to take prepared URIs for Google Analytics and send them on.</param>
 public AnalyticsClient(Configuration configuration, SessionManager sessionManager, IEnvironment environment, Action<Uri> sender)
 {
     this.sessionManager = sessionManager;
     this.sender = sender;
     tracker = new UrchinTracker(configuration, sessionManager, environment);
     hostName = configuration.HostName;
 }
 /// <summary>
 /// Create a new AnalyticsClient with a given configuration, session, environment and URI sender.
 /// </summary>
 /// <param name="configuration">Configuration of this Google Analytics Urchin client.</param>
 /// <param name="sessionManager">Session manager with visitor and session information.</param>
 /// <param name="environment">Provider of environmental information such as screen resolution.</param>
 /// <param name="sender">Action to take prepared URIs for Google Analytics and send them on.</param>
 public void Configure(UrchinConfiguration configuration, SessionManager sessionManager, IEnvironment environment, Action<Uri> sender)
 {
     Debug.Assert(tracker == null);
     var newTracker = new UrchinTracker(configuration, sessionManager, environment, sender);
     while (queue.Count > 0)
         newTracker.Track(queue.Dequeue());
     tracker = newTracker;
 }
示例#3
0
        /// <summary>
        /// Create a new AnalyticsClient with a given configuration, session, environment and URI sender.
        /// </summary>
        /// <param name="configuration">Configuration of this Google Analytics Urchin client.</param>
        /// <param name="sessionManager">Session manager with visitor and session information.</param>
        /// <param name="environment">Provider of environmental information such as screen resolution.</param>
        /// <param name="sender">Action to take prepared URIs for Google Analytics and send them on.</param>
        public void Configure(UrchinConfiguration configuration, SessionManager sessionManager, IEnvironment environment, Action <Uri> sender)
        {
            Debug.Assert(tracker == null);
            var newTracker = new UrchinTracker(configuration, sessionManager, environment, sender);

            while (queue.Count > 0)
            {
                newTracker.Track(queue.Dequeue());
            }
            tracker = newTracker;
        }