数数关闭上报日志
parent
bf8738d945
commit
7de19c7f40
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9512e8a40d69199a7ba149aea8f9b9f75eb66bf1
|
Subproject commit 2b9595150adc70841cc573ff368df92f4c144afc
|
||||||
|
|
@ -52,13 +52,18 @@ public class ThikingDataHelper : SdkHelper, IBIService
|
||||||
DebugUtil.LogWarning("[ThinkingData] 未从渠道配置读取到 serverUrl,使用默认值");
|
DebugUtil.LogWarning("[ThinkingData] 未从渠道配置读取到 serverUrl,使用默认值");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
_serverUrl = "https://phxh-receiver.kedrgame.com/";
|
||||||
|
_appId = "debug-appid";
|
||||||
|
#endif
|
||||||
|
|
||||||
DebugUtil.Log("[ThinkingData] 初始化配置 - AppId: {0}, ServerUrl: {1}", _appId, _serverUrl);
|
DebugUtil.Log("[ThinkingData] 初始化配置 - AppId: {0}, ServerUrl: {1}", _appId, _serverUrl);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TDConfig config = new TDConfig(_appId, _serverUrl);
|
TDConfig config = new TDConfig(_appId, _serverUrl);
|
||||||
TDAnalytics.Init(config);
|
TDAnalytics.Init(config);
|
||||||
|
TDAnalytics.EnableLog(false);
|
||||||
// 尝试获取 DeviceId 和 DistinctId 验证初始化
|
// 尝试获取 DeviceId 和 DistinctId 验证初始化
|
||||||
var deviceId = TDAnalytics.GetDeviceId();
|
var deviceId = TDAnalytics.GetDeviceId();
|
||||||
_distinctId = TDAnalytics.GetDistinctId(_appId);
|
_distinctId = TDAnalytics.GetDistinctId(_appId);
|
||||||
|
|
@ -123,7 +128,7 @@ public class ThikingDataHelper : SdkHelper, IBIService
|
||||||
_superProperties.Clear();
|
_superProperties.Clear();
|
||||||
_superProperties[name] = value;
|
_superProperties[name] = value;
|
||||||
// 设置用户属性
|
// 设置用户属性
|
||||||
TDAnalytics.UserSet(_superProperties, _appId);
|
TDAnalytics.UserSet(_superProperties, _appId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReportEvent(string eventName, Dictionary<string, object> param = null)
|
public void ReportEvent(string eventName, Dictionary<string, object> param = null)
|
||||||
|
|
@ -164,7 +169,8 @@ public class ThikingDataHelper : SdkHelper, IBIService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, object> BuildFinalEventParameters(string eventName, Dictionary<string, object> originalParameters)
|
public Dictionary<string, object> BuildFinalEventParameters(string eventName,
|
||||||
|
Dictionary<string, object> originalParameters)
|
||||||
{
|
{
|
||||||
var finalParams = new Dictionary<string, object>(originalParameters ?? new Dictionary<string, object>());
|
var finalParams = new Dictionary<string, object>(originalParameters ?? new Dictionary<string, object>());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue