Exemple #1
0
        private void AnalyticsManager_RealTimeUpdateEvent(AnalyticsManager analytics)
        {
            float rtUsers     = analytics.getRealtimeValue("rt:activeUsers");
            float rtPageViews = analytics.getRealtimeValue("rt:pageviews");

            Debug.WriteLine("Realtime Update:");
            Debug.WriteLine("Users: " + rtUsers + " PageViews:" + rtPageViews);
        }
Exemple #2
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;

            AnalyticsManager         = new AnalyticsManager();
            AnalyticsFizVizInterface = new AnalyticsFizVizInterface(AnalyticsManager);
        }
        private void AnalyticsManager_AnalyticsUpdateEvent(AnalyticsManager analytics)
        {
            if (!Metric.StartsWith("ga:"))
            {
                return;
            }

            float value = analytics.getRealtimeValue(Metric);

            SimplePosition(value);
        }
        public AnalyticsFizVizInterface(AnalyticsManager analytics)
        {
            DisplayAngleMinimum = 0;
            DisplayAngleMaximum = 360;
            MetricMinimum       = 0;
            MetricMaximum       = 1000;
            Metric = "";

            analytics.AnalyticsUpdateEvent += AnalyticsManager_AnalyticsUpdateEvent;
            analytics.RealTimeUpdateEvent  += AnalyticsManager_RealTimeUpdateEvent;
        }
Exemple #5
0
        private void AnalyticsManager_AnalyticsUpdateEvent(AnalyticsManager analytics)
        {
            float avgSessions        = analytics.getHistoricalAverage("ga:sessions");
            float avgPageViews       = analytics.getHistoricalAverage("ga:pageviews");
            float avgUsers           = analytics.getHistoricalAverage("ga:users");
            float avgBounce          = analytics.getHistoricalValue("ga:bounceRate");
            float avgSessionDuration = analytics.getHistoricalValue("ga:avgSessionDuration");

            float sessions        = analytics.getTodayValue("ga:sessions");
            float pageViews       = analytics.getTodayValue("ga:pageviews");
            float users           = analytics.getTodayValue("ga:users");
            float bounceRate      = analytics.getTodayValue("ga:bounceRate");
            float sessionDuration = analytics.getTodayValue("ga:avgSessionDuration");

            Debug.WriteLine("Analytics Update:");
            Debug.WriteLine("Sessions: " + sessions + " avg:" + avgSessions);
            Debug.WriteLine("PageViews: " + pageViews + " avg:" + avgPageViews);
            Debug.WriteLine("Users: " + users + " avg:" + avgUsers);
            Debug.WriteLine("Bounce: " + bounceRate + " avg:" + avgBounce);
            Debug.WriteLine("Duration: " + sessionDuration + " avg:" + avgSessionDuration);
        }