From dac3fed30337b6a00968b4d6a2952d8bcaaba57a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 4 Aug 2016 23:27:50 -0400 Subject: [PATCH] Added some analytics events to settings page --- src/App/Pages/Settings/SettingsPage.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/App/Pages/Settings/SettingsPage.cs b/src/App/Pages/Settings/SettingsPage.cs index a33ffc1e3..fd945c485 100644 --- a/src/App/Pages/Settings/SettingsPage.cs +++ b/src/App/Pages/Settings/SettingsPage.cs @@ -18,6 +18,7 @@ namespace Bit.App.Pages private readonly ISettings _settings; private readonly IFingerprint _fingerprint; private readonly IPushNotification _pushNotification; + private readonly IGoogleAnalyticsService _googleAnalyticsService; // TODO: Model binding context? @@ -28,6 +29,7 @@ namespace Bit.App.Pages _settings = Resolver.Resolve(); _fingerprint = Resolver.Resolve(); _pushNotification = Resolver.Resolve(); + _googleAnalyticsService = Resolver.Resolve(); Init(); } @@ -184,6 +186,7 @@ namespace Bit.App.Pages return; } + _googleAnalyticsService.TrackAppEvent("OpenedSetting", "TwoStep"); Device.OpenUri(new Uri("https://vault.bitwarden.com")); } @@ -239,6 +242,7 @@ namespace Bit.App.Pages { if(Device.OS == TargetPlatform.iOS) { + _googleAnalyticsService.TrackAppEvent("OpenedSetting", "RateApp"); var appStoreId = "1137397744"; Device.OpenUri(new Uri($"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id={appStoreId}&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software")); } @@ -251,6 +255,7 @@ namespace Bit.App.Pages private void LockCell_Tapped(object sender, EventArgs e) { + _googleAnalyticsService.TrackAppEvent("Locked"); _settings.AddOrUpdateValue(Constants.SettingLocked, true); MessagingCenter.Send(Application.Current, "Lock", true); } @@ -273,6 +278,7 @@ namespace Bit.App.Pages return; } + _googleAnalyticsService.TrackAppEvent("OpenedSetting", "ChangePassword"); Device.OpenUri(new Uri("https://vault.bitwarden.com")); } @@ -284,6 +290,7 @@ namespace Bit.App.Pages return; } + _googleAnalyticsService.TrackAppEvent("OpenedSetting", "ChangeEmail"); Device.OpenUri(new Uri("https://vault.bitwarden.com")); }