Exemplo n.º 1
0
 private GoogleAnalyticsTracker(string trackingID, int dispatchInterval)
 {
     trackingId = trackingID;
     Gai.SharedInstance.Logger.SetLogLevel(LogLevel.Info);
     Gai.SharedInstance.DispatchInterval        = dispatchInterval;
     Gai.SharedInstance.TrackUncaughtExceptions = true;
     GaTracker = Gai.SharedInstance.GetTracker(trackingId);
     GaTracker.SetAllowIdfaCollection(true);
 }
        /**
         * Track caught exceptions
         */
        public void TrackException(Exception exception)
        {
            string description = exception.Message + "\nStackTrace:\n" + exception.StackTrace;

            GaTracker.Send(new HitBuilders.ExceptionBuilder()
                           .SetDescription(description)
                           .SetFatal(true)
                           .Build());
        }
        public void TrackEvent(string category, string eventName, Boolean online)
        {
            string action = (online ? "" : OFFLINE) + " - " + eventName;

            GaTracker.Send(new HitBuilders.EventBuilder()
                           .SetCategory(category)
                           .SetAction(action)
                           .Build());
        }
        private GoogleAnalyticsTracker(string trackingID, int dispatchPeriod)
        {
            trackingId = trackingID;
            var analytics = GoogleAnalytics.GetInstance(Application.Context);

            analytics.SetLocalDispatchPeriod(dispatchPeriod);
            GaTracker = analytics.NewTracker(trackingId);
            GaTracker.EnableAdvertisingIdCollection(true);
            GaTracker.EnableExceptionReporting(true);
        }
 public void TrackScreenView(string screenName, Boolean online)
 {
     screenName = (online ? "" : OFFLINE) + " - " + screenName;
     GaTracker.SetScreenName(screenName);
     GaTracker.Send(new HitBuilders.ScreenViewBuilder().Build());
 }
 public ValuesController(GaTracker tracker)
 {
     _tracker = tracker;
 }