public static void TrackPageView(string page, string title) { if(!Config.Instance.GoogleAnalytics) return; _pageViewRequest = Session.CreatePageViewRequest(page, title); _pageViewRequest.Send(); }
public static void Track(this IAnalyticsPageViewRequest request, Screen screen) { EventHandler <ActivationEventArgs> activated = (s, e) => ScreenActivated(request); m_screens.Add(screen, activated); screen.Activated += activated; }
public static void TrackPageView(string page, string title) { if (!Config.Instance.GoogleAnalytics) { return; } _pageViewRequest = Session.CreatePageViewRequest(page, title); _pageViewRequest.Send(); }
private static void Init() { _session = new AnalyticsSession("http://unband.nachmore.com/app", "UA-56820272-3"); var props = Settings.Current; _client = _session.CreatePageViewRequest("/", "Global"); if (props.FirstRun) { TrackEvent(TelemetryCategory.General, "Install", props.Device); // TODO: would be nice to fire a new OS event on system upgrade TrackEvent(TelemetryCategory.General, "OS", GetOS()); } }
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(); }
private static void Init() { _session = new AnalyticsSession("http://toastify.nachmore.com/app", "UA-61123985-2"); var settings = SettingsXml.Current; // abort asap if we are surpressing analytics if (settings.PreventAnalytics) { return; } _session.SetCustomVariable(1, "OS Version", GetOS()); _client = _session.CreatePageViewRequest("/", "Global"); if (SettingsXml.Current.FirstRun) { TrackEvent(TelemetryCategory.General, "Install", GetOS()); SettingsXml.Current.FirstRun = false; } }
public GoogleAnalyticsPage(AnalyticsSession analyticsSession, string pageName) { _pageName = pageName; _page = analyticsSession.CreatePageViewRequest(pageName, pageName); }
/// <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); }
public FourViewModel(AnalyticsSession analytics) { m_page = analytics.CreatePageViewRequest("/four", ""); m_page.Track(this); }
private static void ScreenActivated(IAnalyticsPageViewRequest request) { request.Send(); }
public static void Untrack(this IAnalyticsPageViewRequest request, Screen screen) { screen.Activated -= m_screens[screen]; m_screens.Remove(screen); }