From fe1347beae7e5081ec14dc1a95fb2f6a1ac6b1a9 Mon Sep 17 00:00:00 2001 From: Alexander Zeier Date: Sat, 28 Apr 2018 15:01:59 -0600 Subject: [PATCH] Add premium flag to app start metric --- Hearthstone Deck Tracker/Core.cs | 1 + Hearthstone Deck Tracker/Utility/Analytics/Influx.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Hearthstone Deck Tracker/Core.cs b/Hearthstone Deck Tracker/Core.cs index e95c9db7ab..a2b7c2ebf1 100644 --- a/Hearthstone Deck Tracker/Core.cs +++ b/Hearthstone Deck Tracker/Core.cs @@ -161,6 +161,7 @@ public static async void Initialize() Helper.GetCurrentVersion(), newUser, HSReplayNetOAuth.IsFullyAuthenticated, + HSReplayNetOAuth.AccountData?.IsPremium?.Equals("true", StringComparison.InvariantCultureIgnoreCase) ?? false, (int)(DateTime.UtcNow - _startUpTime).TotalSeconds, PluginManager.Instance.Plugins.Count ); diff --git a/Hearthstone Deck Tracker/Utility/Analytics/Influx.cs b/Hearthstone Deck Tracker/Utility/Analytics/Influx.cs index ad67b00f4c..bbfe615b85 100644 --- a/Hearthstone Deck Tracker/Utility/Analytics/Influx.cs +++ b/Hearthstone Deck Tracker/Utility/Analytics/Influx.cs @@ -23,7 +23,7 @@ internal class Influx private static DateTime? _lastMainWindowActivation; private static DateTime _oAuthInitiated; - public static void OnAppStart(Version version, bool isNew, bool authenticated, int startupDuration, int numPlugins) + public static void OnAppStart(Version version, bool isNew, bool authenticated, bool premium, int startupDuration, int numPlugins) { if(!Config.Instance.GoogleAnalytics) return; @@ -33,6 +33,7 @@ public static void OnAppStart(Version version, bool isNew, bool authenticated, i .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)