public static void TrackEvent(string category, string action, string label = "", string value = "")
 {
     if (!Config.Instance.GoogleAnalytics)
     {
         return;
     }
     _pageViewRequest?.SendEvent(category, action, label, value);
 }
        public void ApplicationStart()
        {
            if (_analyticsSession == null)
            {
                _analyticsSession = new AnalyticsSession(Domain, GaCode);
            }

            _page = _analyticsSession.CreatePageViewRequest(
                "/",     // path
                "Main"); // page title

            _apptimer = _page.StartTiming("Application", "WPF", "ExecutionTime");

            _page.SendEvent("Application", "AppStart", string.Empty, "1");

            _page.Send();
        }
 public void FeatureUsed(string featureName)
 {
     _page.SendEvent(_pageName, featureName, featureName, "1");
 }
Esempio n. 4
0
        /// <summary>
        /// Sends an analytics event.
        /// </summary>
        /// <param name="action">The analytics action.</param>
        /// <param name="label">>The analytics label.</param>
        /// <param name="value">>The analytics value.</param>
        public void SendEvent(AnalyticsAction action, String label, String value)
        {
            IAnalyticsPageViewRequest page = this.Session.CreatePageViewRequest("/", "Home page");

            page.SendEvent(AnalyticsService.AnalyticsServiceCategory, action.ToString(), label, value);
        }
Esempio n. 5
0
 public void DoThing()
 {
     m_page.SendEvent("Do", "thing", "", "");
 }
 public void FeatureUsed(string featureName)
 {
     _page.SendEvent("Main", featureName, string.Empty, "1");
 }