1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 23:33:34 +00:00

Instrumented key events in extension

This commit is contained in:
Kyle Spearrin
2016-08-04 00:25:10 -04:00
parent a831c9ac4f
commit 561c972c96
6 changed files with 40 additions and 5 deletions

View File

@@ -36,12 +36,25 @@ namespace Bit.Android.Services
_setUserId = true;
}
public void TrackEvent(string category, string eventName)
public void TrackAppEvent(string eventName, string label = null)
{
TrackEvent("App", eventName, label);
}
public void TrackExtensionEvent(string eventName, string label = null)
{
throw new NotSupportedException();
}
public void TrackEvent(string category, string eventName, string label = null)
{
var builder = new HitBuilders.EventBuilder();
builder.SetCategory(category);
builder.SetAction(eventName);
builder.SetLabel("AppEvent");
if(label != null)
{
builder.SetLabel(label);
}
SetUserId();
_tracker.Send(builder.Build());