public static void OnAppStart(Version version, bool isNew, bool authenticated, bool premium, int startupDuration, int numPlugins) { if (!Config.Instance.GoogleAnalytics) { return; } _appStartTime = DateTime.Now; _new = isNew; var point = new InfluxPointBuilder("hdt_app_start") .Tag("version", version.ToVersionString(true)) .Tag("new", isNew) .Tag("authenticated", authenticated) .Tag("premium", premium) .Tag("collection_syncing", Config.Instance.SyncCollection) .Tag("collections_uploaded", Account.Instance.CollectionState.Count) .Tag("auto_upload", Config.Instance.HsReplayAutoUpload) .Tag("lang_card", Config.Instance.SelectedLanguage) .Tag("lang_ui", Config.Instance.Localization.ToString()) .Field("num_plugins", numPlugins) .Field("startup_duration", startupDuration); #if (SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif WritePoint(point.Build()); }
public static void OnAppExit(Version version) { if (!Config.Instance.GoogleAnalytics) { return; } var sessionDuration = (DateTime.Now - _appStartTime).TotalSeconds; var point = new InfluxPointBuilder("hdt_app_exit") .Tag("version", version.ToVersionString(true)) .Tag("new", _new) .Field("session_duration_seconds", (int)sessionDuration); #if (SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif if (_pctHsReplayDataTotal.HasValue) { point.Field("pct_hsreplay_data_total", _pctHsReplayDataTotal.Value); } if (_pctHsReplayData.HasValue) { point.Field("pct_hsreplay_data_last14d", _pctHsReplayData.Value); } WritePoint(point.Build()); }
public static void OnAppStart(Version version, LoginType loginType, bool isNew) { if(!Config.Instance.GoogleAnalytics) return; var point = new InfluxPointBuilder("hdt_app_start").Tag("version", version.ToVersionString()).Tag("login_type", loginType).Tag("new", isNew); #if(SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif WritePoint(point.Build()); }
public static void OnAppStart(Version version, LoginType loginType, bool isNew) { if (!Config.Instance.GoogleAnalytics) { return; } var point = new InfluxPointBuilder("hdt_app_start").Tag("version", version.ToVersionString()).Tag("login_type", loginType).Tag("new", isNew); #if (SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif WritePoint(point.Build()); }
public static void OnAppStart(Version version, LoginType loginType, bool isNew, int startupDuration) { if(!Config.Instance.GoogleAnalytics) return; var point = new InfluxPointBuilder("hdt_app_start") .Tag("version", version.ToVersionString()).Tag("login_type", loginType).Tag("new", isNew) .Tag("auto_upload", Config.Instance.HsReplayAutoUpload) .Field("startup_duration", startupDuration); #if(SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif WritePoint(point.Build()); }
public static void OnAppStart(Version version, LoginType loginType, bool isNew, int startupDuration) { if (!Config.Instance.GoogleAnalytics) { return; } var point = new InfluxPointBuilder("hdt_app_start") .Tag("version", version.ToVersionString()).Tag("login_type", loginType).Tag("new", isNew) .Tag("auto_upload", Config.Instance.HsReplayAutoUpload).Field("user", Config.Instance.Id) .Field("startup_duration", startupDuration); #if (SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif WritePoint(point.Build()); }
public static void OnAppStart(Version version, bool isNew, int startupDuration, int numPlugins) { if (!Config.Instance.GoogleAnalytics) { return; } _appStartTime = DateTime.Now; _new = isNew; var point = new InfluxPointBuilder("hdt_app_start") .Tag("version", version.ToVersionString(true)) .Tag("new", isNew) .Tag("auto_upload", Config.Instance.HsReplayAutoUpload) .Field("num_plugins", numPlugins) .Field("startup_duration", startupDuration); #if (SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif WritePoint(point.Build()); }
public static void OnAppExit(Version version) { if (!Config.Instance.GoogleAnalytics) { return; } var sessionDuration = (DateTime.Now - _appStartTime).TotalSeconds; var point = new InfluxPointBuilder("hdt_app_exit") .Tag("version", version.ToVersionString(true)) .Tag("new", _new) .Tag("stats_window_used", Core.StatsOverviewInitialized) .Field("session_duration_seconds", (int)sessionDuration); #if (SQUIRREL) point.Tag("squirrel", true); #else point.Tag("squirrel", false); #endif if (_pctHsReplayDataTotal.HasValue) { point.Field("pct_hsreplay_data_total", _pctHsReplayDataTotal.Value); } if (_pctHsReplayData.HasValue) { point.Field("pct_hsreplay_data_last14d", _pctHsReplayData.Value); } if (_lastMainWindowActivation != null) { OnMainWindowDeactivated(); } point.Field("window_activations", MainWindowActivations.Count); point.Field("window_active_duration", (int)MainWindowActivations.Average()); WritePoint(point.Build()); }