private void DoTrack() { _isShowAlert = false; if (_selectedTrack == IdSession) { if (checkDictionary(_sessionProperties)) { AppMetr.TrackSession(_sessionProperties); } else { AppMetr.TrackSession(); } } else if (_selectedTrack == IdEvent) { if (_fieldTrackEvent == "") { // error ShowAlert("Please fill in all fields"); } else { if (checkDictionary(_eventProperties)) { AppMetr.TrackEvent(_fieldTrackEvent, _eventProperties); } else { AppMetr.TrackEvent(_fieldTrackEvent); } } } else if (_selectedTrack == IdPayment) { if (checkDictionary(_paymentList)) { if (checkDictionary(_paymentProperties)) { AppMetr.TrackPayment(_paymentList, _paymentProperties); } else { AppMetr.TrackPayment(_paymentList); } } else { // error ShowAlert("Please fill in all fields"); } } AppMetr.Flush(); }
public MonitoringDataAccess(IMonitoring monitoring, AppMetr appMetr) { _monitoring = monitoring; _appMetr = appMetr; _monitoringCounterService = new MonitoringCounterService(appMetr); _flushTimer = new AppMetrTimer( MonblankConst.MonitorFlushIntervalMinutes * MillisPerMinute, Execute, "MonitorFlushJob"); new Thread(_flushTimer.Start).Start(); }
IEnumerator Start() { AppMetr.Identify("testUserId"); string userId = AppMetr.GetInstanceIdentifier(); string deviceKey = AppMetr.GetDeviceKey() ?? "null"; GetComponent <Text>().text += string.Format("UID: {0}\nDevice key: {1}", userId, deviceKey); Debug.Log("Device key 1: " + deviceKey); yield return(new WaitForSeconds(4)); deviceKey = AppMetr.GetDeviceKey() ?? "null"; Debug.Log("Device key 2: " + deviceKey); }
public MonitoringCounterService(AppMetr appMetr) { _appMetr = appMetr; }