Merge branch 'main' of http://px.8ms.co:6002/yufeng/SDK_UnityMoney
This commit is contained in:
commit
295b16d3cd
|
@ -18,7 +18,7 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
|||
private string callbackNetwork = "";
|
||||
bool m_start = false;
|
||||
private int callGetTimes = 0;
|
||||
|
||||
|
||||
public void Init()
|
||||
{
|
||||
//开始计时
|
||||
|
@ -41,6 +41,11 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
|||
|
||||
ShuShuEvent.Instance.Track("adjust_init");
|
||||
FireBaseAnalyticsManager.Instance.LogEvent("adjust_init");
|
||||
Adjust.GetAdid((id)=>
|
||||
{
|
||||
ShuShuEvent.Instance.SetSuperProperties(new Dictionary<string, object>() { { "adid", id } });
|
||||
ShuShuEvent.Instance.UserSet(new Dictionary<string, object>() { { "adid", id } });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,10 +10,17 @@ namespace WZ
|
|||
/// <summary>
|
||||
/// 设置用户属性
|
||||
/// </summary>
|
||||
public void UserSet(Dictionary<string, object> dic)
|
||||
public void UserSet(Dictionary<string, object> dic,bool setOnce = false)
|
||||
{
|
||||
LoggerUtils.Debug("[shushu] userset:"+JsonMapper.ToJson(dic));
|
||||
TDAnalytics.UserSet(dic);
|
||||
if (setOnce)
|
||||
{
|
||||
TDAnalytics.UserSetOnce(dic);
|
||||
}
|
||||
else
|
||||
{
|
||||
TDAnalytics.UserSet(dic);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -80,17 +87,17 @@ namespace WZ
|
|||
/// <param name="number">第几次展示该格式的广告</param>
|
||||
public void OnAdRevenueEvent(string ad_platform, string ad_source, string ad_unit_name, string ad_format, double revenue, string position, int number)
|
||||
{
|
||||
Dictionary<string, object> properties = new Dictionary<string, object>();
|
||||
properties.Add("ad_platform", ad_platform);
|
||||
properties.Add("ad_source", ad_source);
|
||||
properties.Add("ad_unit_name", ad_unit_name);
|
||||
properties.Add("ad_format", ad_format);
|
||||
properties.Add("value", revenue);
|
||||
properties.Add("currency", "USD");
|
||||
properties.Add("position", position);
|
||||
properties.Add("number", number);
|
||||
|
||||
TDAnalytics.Track("ad_impression", properties);
|
||||
TDAnalytics.Track("ad_impression", new Dictionary<string, object>
|
||||
{
|
||||
{ "ad_platform", ad_platform },
|
||||
{ "ad_source", ad_source },
|
||||
{ "ad_unit_name", ad_unit_name },
|
||||
{ "ad_format", ad_format },
|
||||
{ "value", revenue },
|
||||
{ "currency", "USD" },
|
||||
{ "position", position },
|
||||
{ "number", number }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AdjustSdk;
|
||||
|
@ -14,7 +15,11 @@ namespace WZ
|
|||
TDAnalytics.Init(StaticValue.TDAppID, StaticValue.TDServerURL);
|
||||
//开启自动采集事件
|
||||
TDAnalytics.EnableAutoTrack(TDAutoTrackEventType.AppInstall | TDAutoTrackEventType.AppStart | TDAutoTrackEventType.AppEnd);
|
||||
|
||||
ShuShuEvent.Instance.UserSet(new Dictionary<string, object>
|
||||
{
|
||||
{ "register_timestamp", DateTimeOffset.UtcNow.ToUnixTimeSeconds() }
|
||||
},true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue