adclick/adclose添加冷启动还是热启动

This commit is contained in:
juncong lee 2025-12-15 10:46:57 +08:00
parent e3d978494c
commit 4147dc089f
3 changed files with 5 additions and 6 deletions

View File

@ -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)

View File

@ -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());