public void TrackPlayedGame(ApplicationUser currentUser, TransactionSource transactionSource) { IUniversalAnalyticsEvent universalAnalyticsEvent = eventFactory.MakeUniversalAnalyticsEvent( currentUser.AnonymousClientId, EventCategoryEnum.PlayedGames.ToString(), EventActionEnum.Created.ToString(), transactionSource.ToString()); eventTracker.TrackEvent(universalAnalyticsEvent); }
public MainViewModel(IEventTracker tracker = null) { Contacts = new ObservableCollection <Contact>(); Add = new RelayCommand(p => { if (string.IsNullOrWhiteSpace(Name) || string.IsNullOrWhiteSpace(Email)) { return; } Contacts.Add(new Contact(Name, Email)); Name = string.Empty; Email = string.Empty; tracker?.TrackEvent("ContactAdded"); }); }