TrackEvent() public method

public TrackEvent ( string category, string action, string label, int value = null ) : void
category string
action string
label string
value int
return void
Ejemplo n.º 1
0
        private void RecordGameSessionStarted()
        {
            if (!_settings.UserAgreementAccepted || !_settings.SendUsageStatistics || _gameSessionStartedRecorded)
            {
                return;
            }

            _googleAnalyticsApi.TrackEvent("gamesession", "started", "Game Session Started");
            var trackingActive = (_host.EyeTrackingDeviceStatus.IsValid &&
                                  _host.EyeTrackingDeviceStatus.Value == EyeTrackingDeviceStatus.Tracking);

            if (trackingActive)
            {
                _googleAnalyticsApi.TrackEvent("gamesession", "devicesconnected", "Device Connected", 1);
            }
            else
            {
                _googleAnalyticsApi.TrackEvent("gamesession", "devicesdisconnected", "Device Disconnected", 1);
            }

            _gameSessionStartedRecorded = true;
        }