访客id接口修改
parent
cb33f92b67
commit
fdb4c66ed5
|
@ -17,7 +17,7 @@ namespace GameLogic
|
|||
public Dictionary<string, object> GetDynamicSuperProperties()
|
||||
{
|
||||
return new Dictionary<string, object>() {
|
||||
{"KEY_DYNAMIC_Time", DateTime.Now}
|
||||
//{"KEY_DYNAMIC_Time", DateTime.Now}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -29,14 +29,23 @@ namespace GameLogic
|
|||
}
|
||||
void Start()
|
||||
{
|
||||
// 设置 Distinct ID
|
||||
ThinkingAnalyticsAPI.Identify("unity_id");
|
||||
ThinkingAnalyticsAPI.Identify("unity_debug_id", "debug-appid");
|
||||
|
||||
// 开启自动采集启动和关闭事件
|
||||
ThinkingAnalyticsAPI.EnableAutoTrack(AUTO_TRACK_EVENTS.ALL);
|
||||
}
|
||||
|
||||
// 设置访客Id
|
||||
public void SetDistinctId(string distinctId)
|
||||
{
|
||||
ThinkingAnalyticsAPI.Identify(distinctId);
|
||||
}
|
||||
// 设置访客Id
|
||||
public string GetDistinctId()
|
||||
{
|
||||
return ThinkingAnalyticsAPI.GetDistinctId();
|
||||
}
|
||||
|
||||
// 设置
|
||||
|
||||
public void ClearSuperProperties()
|
||||
{
|
||||
// 清除公共事件属性
|
||||
|
@ -62,7 +71,7 @@ namespace GameLogic
|
|||
{
|
||||
Debug.Log("事件名称:" + trackEvent);
|
||||
Debug.Log("事件数据:" + trackData);
|
||||
Dictionary<string, object> data = this.stringToDic(trackData);
|
||||
Dictionary<string, object> data = stringToDic(trackData);
|
||||
foreach (string id in data.Keys)
|
||||
{
|
||||
object value = data[id];
|
||||
|
|
Loading…
Reference in New Issue