diff --git a/Runtime/GuruAnalytics/Runtime/Script/GuruAnalytics.cs b/Runtime/GuruAnalytics/Runtime/Script/GuruAnalytics.cs index c6d2d78..ef6cdc4 100644 --- a/Runtime/GuruAnalytics/Runtime/Script/GuruAnalytics.cs +++ b/Runtime/GuruAnalytics/Runtime/Script/GuruAnalytics.cs @@ -140,11 +140,12 @@ namespace Guru _experimentGroupId = groupId; EnableErrorLog = enabelErrorLog; + _lastReportTime = new DateTime(1970, 1, 1); // 初始化上报时间 + _isReady = true; // 初始化成功标志位 + // 初始化参数 Agent.Init(appId, deviceInfo, baseUrl, uploadIpAddress, onInitComplete, isDebug); - - _lastReportTime = new DateTime(1970, 1, 1); - _isReady = true; + Debug.Log($"{Tag} --- Guru Analytics [{Version}] initialized."); Debug.Log($"{Tag} --- GroupId: {groupId}"); } @@ -182,13 +183,13 @@ namespace Guru { if (!_isReady) { - Debug.LogWarning($"{Tag} --- is Not Ready SetUserProperty: [{key}, {value}] failed"); + Debug.LogWarning($"{Tag}[GA] --- is Not Ready SetUserProperty: [{key}, {value}] failed"); return; } if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(value)) return; // CacheUserProperty(key, value); // 添加用户属性 // ReSharper disable once Unity.PerformanceCriticalCodeInvocation - Debug.Log($"{Tag} --- SetUserProperty: [{key}, {value}]"); + Debug.Log($"{Tag}[GA] --- SetUserProperty: [{key}, {value}]"); Agent.SetUserProperty(key, value); } /// diff --git a/Runtime/GuruCore/Runtime/Analytics/Analytics.cs b/Runtime/GuruCore/Runtime/Analytics/Analytics.cs index 29e4aa4..e5b5532 100644 --- a/Runtime/GuruCore/Runtime/Analytics/Analytics.cs +++ b/Runtime/GuruCore/Runtime/Analytics/Analytics.cs @@ -133,6 +133,7 @@ namespace Guru { if (!string.IsNullOrEmpty(IPMConfig.IPM_UID) && !_guruEventDriver.IsReady) { + Debug.Log($"[ANU][GA] --- ShouldFlushGuruEvents -> _guruEventDriver.TriggerFlush"); _guruEventDriver.TriggerFlush(); } } diff --git a/Runtime/GuruCore/Runtime/Analytics/Events/AbstractEventDriver.cs b/Runtime/GuruCore/Runtime/Analytics/Events/AbstractEventDriver.cs index f343179..e27ee69 100644 --- a/Runtime/GuruCore/Runtime/Analytics/Events/AbstractEventDriver.cs +++ b/Runtime/GuruCore/Runtime/Analytics/Events/AbstractEventDriver.cs @@ -115,13 +115,13 @@ namespace Guru { while(_eventBuffer.Pop(out var trackingEvent)) { - Debug.Log($"[ANU] --- GuruAnalytics: FlushAll Events: {trackingEvent.eventName}"); + Debug.Log($"[ANU][GA] --- FlushAll Events: {trackingEvent.eventName}"); FlushTrackingEvent(trackingEvent); } foreach (var key in _userPropertyMap.Keys) { - Debug.Log($"[ANU] --- GuruAnalytics: FlushAll Properties: {key}:{ _userPropertyMap[key]}"); + Debug.Log($"[ANU][GA] --- FlushAll Properties: {key}:{ _userPropertyMap[key]}"); SetUserProperty(key, _userPropertyMap[key]); } _userPropertyMap.Clear(); @@ -129,7 +129,7 @@ namespace Guru foreach (var propertyAction in _predefinedPropertyDelayedActions) { - Debug.Log($"[ANU] --- GuruAnalytics: FlushAll predefined Properties: {propertyAction.key}:{ propertyAction}"); + Debug.Log($"[ANU][GA] --- FlushAll predefined Properties: {propertyAction.key}:{ propertyAction}"); propertyAction.Execute(); } _predefinedPropertyDelayedActions.Clear();