public override void TrackEvent(string category, string action, string label = null) { var context = Application.Context; if (context == null) { return; } var eventBuilder = new HitBuilders.EventBuilder(); eventBuilder.SetCategory(category) .SetAction(action); if (label != null) { eventBuilder.SetLabel(label); } foreach (var key in CustomDimensions.Keys) { eventBuilder.SetCustomDimension(key, CustomDimensions[key]); } Tracker.Send(eventBuilder.Build()); }
public void TrackTrace(string message, IDictionary <string, string> properties = null) { HitBuilders.EventBuilder eventBuilder = new HitBuilders.EventBuilder(); eventBuilder.SetCategory(nameof(TrackTrace)); eventBuilder.SetAction(message); eventBuilder.SetLabel(this.ConvertParametersToString(properties)); GoogleMobileAnalyticsProvider.GATracker.Send(((HitBuilders.HitBuilder)eventBuilder).Build()); }
public void Track_App_Event(String GAEventCategory, String EventToTrack) { HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(GAEventCategory); builder.SetAction(EventToTrack); builder.SetLabel("AppEvent"); GATracker.Send(builder.Build()); }
public void RastrearEvento(string categoria, string evento) { HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(categoria); builder.SetAction(evento); builder.SetLabel("AppEvent"); GATracker.Send(builder.Build()); }
public void TrackAppEvent(GAEventCategory category, string eventToTrack) { HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(category.ToString()); builder.SetAction(eventToTrack); builder.SetLabel("AppEvent"); GATracker.Send(builder.Build()); }
public void Track_App_Event(String GAEventCategory, String EventToTrack) { HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(GAEventCategory); builder.SetAction(EventToTrack); builder.SetLabel("AppEvent"); GATracker.Send(builder.Build()); }
public void TrackEvent(string category, string eventName, string label) { var builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetAction(eventName); builder.SetLabel("label"); _tracker.Send(builder.Build()); }
public static void TrackAppEvent(String eventCategory, String eventToTrack) { var builder = new HitBuilders.EventBuilder(); builder.SetCategory(eventCategory); builder.SetAction(eventToTrack); builder.SetLabel("AppEvent"); Rep.Instance.GaTracker.Send(builder.Build()); }
public void TrackEvent(string category, string action, string label) { var builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetAction(action); builder.SetLabel(label); Tracker.Send(builder.Build()); }
public static void TrackAppEvent(String eventCategory, String eventToTrack) { var builder = new HitBuilders.EventBuilder(); builder.SetCategory(eventCategory); builder.SetAction(eventToTrack); builder.SetLabel("AppEvent"); Rep.Instance.GaTracker.Send(builder.Build()); }
public void TrackEvent(string category, string eventName, string label) { var builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetAction(eventName); builder.SetLabel("label"); _tracker.Send(builder.Build()); }
internal static void TrackEvent(string category, string action, string label = "") { #if !DEBUG HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetAction(action); builder.SetLabel(label); GATracker.Send(builder.Build()); #endif }
public void TrackEvent(string category, string title, string eventName) { if (_tracker != null) { HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetLabel(title); builder.SetAction(eventName); _tracker.Send(builder.Build()); } }
public void TrackEvent(string category, string eventName, string label = null) { var builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetAction(eventName); if (label != null) { builder.SetLabel(label); } SetUserId(); _tracker.Send(builder.Build()); }
public virtual async Task TrackEventAsync(string eventName, Dictionary <string, string> properties) { try { string action = string.Empty; string label = string.Empty; int number = 0; if (properties != null && properties.ContainsKey("action")) { action = properties["action"]; } if (properties != null && properties.ContainsKey("label")) { label = properties["label"]; } if (properties != null && properties.ContainsKey("number")) { int.TryParse(properties["number"], out number); } var builder = new HitBuilders.EventBuilder(); builder.SetCategory(eventName.ToLower()); builder.SetAction(action.ToLower()); builder.SetLabel(label.ToLower()); builder.SetValue(number); var eventToTrack = builder.Build(); if (properties != null) { foreach (var property in properties) { if (property.Key != "action" && property.Key != "label" && property.Key != "number") { eventToTrack.Add(property.Key, property.Value); } } } Tracker.Send(eventToTrack); } catch (Exception ex) { _ = TinyInsights.TrackErrorAsync(ex); } }
public void TrackEvent(string eventCategory, string eventAction, string eventLabel = "AppEvent", long eventValue = 0) { if (Verbosity == VerbosityLevel.ReportAll) { var builder = new HitBuilders.EventBuilder(); SetUserIDDimension(builder); builder.SetCategory(eventCategory); builder.SetAction(eventAction); builder.SetLabel(eventLabel); builder.SetValue(eventValue); GATracker.Send(builder.Build()); } }
public void sendGaEvent(String action, String category, String label, long?value) { var gaEvent = new HitBuilders.EventBuilder(); gaEvent.SetAction(action); gaEvent.SetCategory(category); gaEvent.SetLabel(label); if (value.HasValue) { gaEvent.SetValue(value.Value); } var build = gaEvent.Build(); mGATracker.Send(build.ToDictionary()); }
public void TrackTransaction(string transactionName, string transactionId, long transactionCount = 1) { if (Verbosity != VerbosityLevel.AnalyticsOff) { var builder = new HitBuilders.EventBuilder(); SetUserIDDimension(builder); builder.SetCategory("Transactions"); builder.SetAction(transactionName); builder.SetLabel(transactionId); builder.SetValue(transactionCount); GATracker.Send(builder.Build()); } }
public void TrackAppEvent(string Category, string EventAction, string EventLabel) { try { if (numOfTrackerEventHitsInThisSession > 300) { GATracker.Send(new HitBuilders.EventBuilder().SetNewSession().Build()); numOfTrackerEventHitsInThisSession = 0; } else { numOfTrackerEventHitsInThisSession++; } HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory("An_" + Category); builder.SetAction("An_" + EventAction); builder.SetLabel("An_" + EventLabel); GATracker.Send(builder.Build()); } catch { } }
static void TrackUnhandledException(Exception ex) { var builder_ex = new HitBuilders.ExceptionBuilder(); var errorMessage = CrossAnalytics.Current.ParseException(ex); SetUserIDDimension(builder_ex); builder_ex.SetDescription(errorMessage); builder_ex.SetFatal(true); GATracker.Send(builder_ex.Build()); var builder_ev = new HitBuilders.EventBuilder(); SetUserIDDimension(builder_ev); builder_ev.SetCategory("Crashes"); builder_ev.SetAction(errorMessage); builder_ev.SetLabel(ex.ToString()); GATracker.Send(builder_ev.Build()); }
public void TrackEvent(string category, string action, string label, int value) { try { Debug.WriteLine($"{nameof(TrackEvent)}({category}, {action}, {label}, {value})"); HitBuilders.EventBuilder builder = new HitBuilders.EventBuilder(); builder.SetCategory(category); builder.SetAction(action); builder.SetLabel(label); builder.SetValue(value); GATracker.Send(builder.Build()); } catch (Exception ex) { if (Debugger.IsAttached) { Debugger.Break(); } Debug.WriteLine(ex); } }