36 lines
1.6 KiB
C#
36 lines
1.6 KiB
C#
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using AdjustSdk;
|
||
using ThinkingData.Analytics;
|
||
using UnityEngine;
|
||
namespace WZ
|
||
{
|
||
public class ShuShuMangage : D_MonoSingleton<ShuShuMangage>
|
||
{
|
||
public void Init()
|
||
{
|
||
LoggerUtils.Debug("ShuShuMangage Init" + StaticValue.TDAppID + " serverURL" + StaticValue.TDServerURL);
|
||
// 初始化SDK
|
||
TDAnalytics.Init(StaticValue.TDAppID, StaticValue.TDServerURL);
|
||
//开启自动采集事件
|
||
TDAnalytics.EnableAutoTrack(TDAutoTrackEventType.AppInstall | TDAutoTrackEventType.AppStart | TDAutoTrackEventType.AppEnd);
|
||
//如果用户已登录,可以设置用户的账号ID作为身份唯一标识
|
||
// TDAnalytics.Login("TA");
|
||
var userProperties = new Dictionary<string, object>();
|
||
userProperties.Add("ad_network", AdjustManager.GetAdNetwork());
|
||
userProperties.Add("campaign", AdjustManager.GetCampaign());
|
||
userProperties.Add("adgroup", AdjustManager.GetAdgroup());
|
||
userProperties.Add("creative", AdjustManager.GetCreative());
|
||
ShuShuEvent.Instance.UserSet(userProperties);
|
||
|
||
var publicProperties = new Dictionary<string, object>();
|
||
publicProperties.Add("user_ad_network", AdjustManager.GetAdNetwork());
|
||
publicProperties.Add("user_campaign", AdjustManager.GetCampaign());
|
||
publicProperties.Add("user_adgroup", AdjustManager.GetAdgroup());
|
||
publicProperties.Add("user_creative", AdjustManager.GetCreative());
|
||
AppSDKManager.Instance.SetSuperProperties(publicProperties);
|
||
|
||
}
|
||
|
||
}
|
||
} |