示例#1
0
        public Tracker (Context ctx)
        {
            var ga = GoogleAnalytics.GetInstance (ctx);
            #if DEBUG
            ga.SetDryRun (true);
            #endif

            tracker = ga.NewTracker (Build.GoogleAnalyticsId);
            tracker.SetSessionTimeout ((long)TimeSpan.FromMinutes (5).TotalSeconds);
            tracker.EnableAutoActivityTracking (false);
            tracker.EnableExceptionReporting (false);
        }
示例#2
0
        public Tracker(Context ctx)
        {
            var ga = GoogleAnalytics.GetInstance(ctx);

            #if DEBUG
            ga.SetDryRun(true);
            #endif

            tracker = ga.NewTracker(Build.GoogleAnalyticsId);
            tracker.SetSessionTimeout((long)TimeSpan.FromMinutes(5).TotalSeconds);
            tracker.EnableAutoActivityTracking(false);
            tracker.EnableExceptionReporting(false);
        }
        private static void ForceError()
        {
            IDictionary <string, string> data = new Dictionary <string, string>
            {
                { "k", "v" },
            };

            GoogleAnalytics analytics = GoogleAnalytics.GetInstance(Application.Context);

            Android.Gms.Analytics.Tracker t = analytics.NewTracker("aaa");
            t.Send(data);

            return;
        }