SDK_UnityMoney/Assets/Script/SDKManager/ShuShuMangage/ShuShuMangage.cs

30 lines
1.2 KiB
C#
Raw Normal View History

2025-08-30 09:38:53 +00:00
using System.Collections;
using System.Collections.Generic;
2025-09-03 03:45:52 +00:00
using AdjustSdk;
2025-08-30 09:38:53 +00:00
using ThinkingData.Analytics;
using UnityEngine;
2025-09-01 10:32:50 +00:00
namespace WZ
2025-08-30 09:38:53 +00:00
{
2025-09-02 09:14:49 +00:00
public class ShuShuMangage : D_MonoSingleton<ShuShuMangage>
2025-08-30 09:38:53 +00:00
{
2025-09-01 10:32:50 +00:00
public void Init()
{
2025-09-03 03:45:52 +00:00
LoggerUtils.Debug("ShuShuMangage Init" + StaticValue.TDAppID + " serverURL" + StaticValue.TDServerURL);
2025-09-01 10:32:50 +00:00
// 初始化SDK
2025-09-02 09:50:19 +00:00
TDAnalytics.Init(StaticValue.TDAppID, StaticValue.TDServerURL);
2025-09-01 10:32:50 +00:00
//开启自动采集事件
TDAnalytics.EnableAutoTrack(TDAutoTrackEventType.AppInstall | TDAutoTrackEventType.AppStart | TDAutoTrackEventType.AppEnd);
//如果用户已登录可以设置用户的账号ID作为身份唯一标识
2025-09-02 12:27:05 +00:00
// TDAnalytics.Login("TA");
2025-09-03 03:45:52 +00:00
var properties = new Dictionary<string, object>();
properties.Add("ad_network", AdjustManager.GetAdNetwork());
properties.Add("campaign", AdjustManager.GetCampaign());
properties.Add("adgroup", AdjustManager.GetAdgroup());
properties.Add("creative", AdjustManager.GetCreative());
ShuShuEvent.Instance.UserSet(properties);
AppSDKManager.Instance.SetSuperProperties(properties);
2025-09-01 10:32:50 +00:00
}
}
}