1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 14:53:18 +00:00

More GA event tracking throughout. Added dispatch when ios app is backgrounded.

This commit is contained in:
Kyle Spearrin
2016-08-04 19:35:56 -04:00
parent dd633d4fc1
commit 7c29f8b77a
13 changed files with 106 additions and 14 deletions

View File

@@ -228,7 +228,6 @@ namespace Bit.iOS.Extension
Constants.AppExtensionOldPasswordKey, password);
}
_googleAnalyticsService.TrackExtensionEvent("AutoFilled", _context.ProviderType);
CompleteRequest(itemData);
}
@@ -240,7 +239,21 @@ namespace Bit.iOS.Extension
var resultsItem = new NSExtensionItem { Attachments = new NSItemProvider[] { resultsProvider } };
var returningItems = new NSExtensionItem[] { resultsItem };
ExtensionContext.CompleteRequest(returningItems, null);
if(itemData != null)
{
_googleAnalyticsService.TrackExtensionEvent("AutoFilled", _context.ProviderType);
}
else
{
_googleAnalyticsService.TrackExtensionEvent("Closed", _context.ProviderType);
}
_googleAnalyticsService.Dispatch(() =>
{
NSRunLoop.Main.BeginInvokeOnMainThread(() => {
ExtensionContext.CompleteRequest(returningItems, null);
});
});
}
private void SetIoc()
@@ -296,7 +309,7 @@ namespace Bit.iOS.Extension
var dict = list as NSDictionary;
action(dict);
_googleAnalyticsService.TrackExtensionEvent("ProviderType", type);
_googleAnalyticsService.TrackExtensionEvent("ProcessItemProvider", type);
Debug.WriteLine("BW LOG, ProviderType: " + _context.ProviderType);
Debug.WriteLine("BW LOG, Url: " + _context.Url);