adclick/adclose添加冷启动还是热启动
This commit is contained in:
parent
e3d978494c
commit
4147dc089f
|
|
@ -291,7 +291,7 @@ namespace WZ
|
||||||
|
|
||||||
private void OnSplashAdDismissed(string adSource, string adUnitId, double revenue)
|
private void OnSplashAdDismissed(string adSource, string adUnitId, double revenue)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdClosed(Platfrom, adSource, adUnitId, AdsType.Splash, "", revenue);
|
AdsActionEvents.TrackAdClosed(Platfrom, adSource, adUnitId, AdsType.Splash, AdsSplashManager.Instance._coldLaunch ? "Cold" : "Hot", revenue);
|
||||||
AdsSDKManager.Instance.otherAdsOnShow = false;
|
AdsSDKManager.Instance.otherAdsOnShow = false;
|
||||||
AdsSplashManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
AdsSplashManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
||||||
LoadSplash();
|
LoadSplash();
|
||||||
|
|
@ -306,7 +306,7 @@ namespace WZ
|
||||||
|
|
||||||
private void OnSplashAdClicked(string adSource,string adUnitId,double revenue)
|
private void OnSplashAdClicked(string adSource,string adUnitId,double revenue)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdClicked(Platfrom,adSource,adUnitId,AdsType.Splash,"",revenue);
|
AdsActionEvents.TrackAdClicked(Platfrom,adSource,adUnitId,AdsType.Splash,AdsSplashManager.Instance._coldLaunch ? "Cold" : "Hot",revenue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSplashAdPaid(AdValue adValue)
|
private void OnSplashAdPaid(AdValue adValue)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace WZ
|
||||||
{
|
{
|
||||||
public float backgroundTime = 0;
|
public float backgroundTime = 0;
|
||||||
private int timeoutDuration = 5;
|
private int timeoutDuration = 5;
|
||||||
private bool _coldLaunch = false;
|
public bool _coldLaunch = false;
|
||||||
public Action OnSplashAdCloseCallback;
|
public Action OnSplashAdCloseCallback;
|
||||||
|
|
||||||
public void SetSplashAdCloseCallback(Action action)
|
public void SetSplashAdCloseCallback(Action action)
|
||||||
|
|
@ -22,7 +22,6 @@ namespace WZ
|
||||||
public void InitSplash()
|
public void InitSplash()
|
||||||
{
|
{
|
||||||
timeoutDuration = GetSplashConfigItem().loadtime;
|
timeoutDuration = GetSplashConfigItem().loadtime;
|
||||||
_coldLaunch = true;
|
|
||||||
var isNew = PlayerPrefsUtils.GetPlayerPrefsInt("Firstcold_Splash_Switch", 0) == 0;
|
var isNew = PlayerPrefsUtils.GetPlayerPrefsInt("Firstcold_Splash_Switch", 0) == 0;
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
|
|
@ -71,7 +70,7 @@ namespace WZ
|
||||||
|
|
||||||
private void CheckSplashAdlash(bool isCold)
|
private void CheckSplashAdlash(bool isCold)
|
||||||
{
|
{
|
||||||
|
_coldLaunch = isCold;
|
||||||
if (!isCold)
|
if (!isCold)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Splash, "Hot",(Time.realtimeSinceStartup - backgroundTime).ToString(),GetSplashConfigItem().hot_splash_switch.ToString());
|
AdsActionEvents.TrackAdPosition(AdsType.Splash, "Hot",(Time.realtimeSinceStartup - backgroundTime).ToString(),GetSplashConfigItem().hot_splash_switch.ToString());
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ namespace WZ
|
||||||
{ "ad_format", adFormat.ToString()},
|
{ "ad_format", adFormat.ToString()},
|
||||||
{ "position", pos},
|
{ "position", pos},
|
||||||
{ "backgroundTime", backgroundTime},
|
{ "backgroundTime", backgroundTime},
|
||||||
{"splashSwitch",splashSwitch},
|
{ "splashSwitch",splashSwitch},
|
||||||
{ "number",AdPlayCountManager.GetAdsActionCount(adFormat,AdPlayCountManager.ADPOSITION_COUNT_SUFFIX)}
|
{ "number",AdPlayCountManager.GetAdsActionCount(adFormat,AdPlayCountManager.ADPOSITION_COUNT_SUFFIX)}
|
||||||
};
|
};
|
||||||
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue