修复showfail打点
This commit is contained in:
parent
9a662bf516
commit
1da549c065
|
@ -129,7 +129,6 @@ namespace WZ
|
||||||
_rvShowFailedCallback?.Invoke();
|
_rvShowFailedCallback?.Invoke();
|
||||||
_rvShowFailedCallback = null;
|
_rvShowFailedCallback = null;
|
||||||
LoadRewarded();
|
LoadRewarded();
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom,AdsType.Rewarded,errorMsg,_rvPos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRewardedAdClicked(string adSource,string adUnitId,double revenue)
|
private void OnRewardedAdClicked(string adSource,string adUnitId,double revenue)
|
||||||
|
@ -212,7 +211,6 @@ namespace WZ
|
||||||
|
|
||||||
private void OnInterstitialAdError(string adUnitId, int errorCode, string errorMsg)
|
private void OnInterstitialAdError(string adUnitId, int errorCode, string errorMsg)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom,AdsType.Interstitial,errorMsg,"");
|
|
||||||
_ivCloseCallback?.Invoke(0);
|
_ivCloseCallback?.Invoke(0);
|
||||||
_ivCloseCallback = null;
|
_ivCloseCallback = null;
|
||||||
LoadInterstitial();
|
LoadInterstitial();
|
||||||
|
@ -281,7 +279,6 @@ namespace WZ
|
||||||
|
|
||||||
private void OnSplashAdError(string adUnitId, int errorCode, string errorMsg)
|
private void OnSplashAdError(string adUnitId, int errorCode, string errorMsg)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom, AdsType.Splash, errorMsg, "");
|
|
||||||
AdsSDKManager.Instance.otherAdsOnShow = false;
|
AdsSDKManager.Instance.otherAdsOnShow = false;
|
||||||
AdsSDKManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
AdsSDKManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ namespace WZ
|
||||||
if (!AdsSDKManager.Instance.IsSplashAvailable())
|
if (!AdsSDKManager.Instance.IsSplashAvailable())
|
||||||
{
|
{
|
||||||
LoggerUtils.Debug(" [AppOpen] 热启动 广告是否准备好:");
|
LoggerUtils.Debug(" [AppOpen] 热启动 广告是否准备好:");
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Splash, "", AdsShowFailType.NoFill);
|
||||||
AdsSDKManager.Instance.LoadSplashAd();
|
AdsSDKManager.Instance.LoadSplashAd();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -122,6 +123,7 @@ namespace WZ
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Splash, "", AdsShowFailType.NoFill);
|
||||||
AdsSDKManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
AdsSDKManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
||||||
AdsSDKManager.Instance.LoadSplashAd();
|
AdsSDKManager.Instance.LoadSplashAd();
|
||||||
LoggerUtils.Debug(" [AppOpen] 冷启动广告未准备好");
|
LoggerUtils.Debug(" [AppOpen] 冷启动广告未准备好");
|
||||||
|
@ -140,6 +142,7 @@ namespace WZ
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Splash, "", AdsShowFailType.NoFill);
|
||||||
AdsSDKManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
AdsSDKManager.Instance.OnSplashAdCloseCallback?.Invoke();
|
||||||
AdsSDKManager.Instance.LoadSplashAd();
|
AdsSDKManager.Instance.LoadSplashAd();
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,6 @@ namespace WZ
|
||||||
|
|
||||||
private void OnRewardedAdError(string adUnitId, int code, string msg)
|
private void OnRewardedAdError(string adUnitId, int code, string msg)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom, AdsType.Rewarded, msg, _rvPos);
|
|
||||||
_rvShowFailedCallback?.Invoke();
|
_rvShowFailedCallback?.Invoke();
|
||||||
_rvShowFailedCallback = null;
|
_rvShowFailedCallback = null;
|
||||||
LoadRewarded();
|
LoadRewarded();
|
||||||
|
@ -165,7 +164,6 @@ namespace WZ
|
||||||
|
|
||||||
private void OnInterstitialAdError(string adUnitId, int code, string msg)
|
private void OnInterstitialAdError(string adUnitId, int code, string msg)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom, AdsType.Interstitial, msg, "");
|
|
||||||
_ivCloseCallback?.Invoke(0);
|
_ivCloseCallback?.Invoke(0);
|
||||||
_ivCloseCallback = null;
|
_ivCloseCallback = null;
|
||||||
LoadInterstitial();
|
LoadInterstitial();
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace WZ
|
||||||
|
{
|
||||||
|
public enum AdsShowFailType
|
||||||
|
{
|
||||||
|
NoFill = 1,
|
||||||
|
RuleLimit = 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5e241fedf7dee4098837305d9ec5b823
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -97,15 +97,14 @@ namespace WZ
|
||||||
LoggerUtils.Debug("[actionevent] TrackAdFailToLoad:"+JsonMapper.ToJson(dic));
|
LoggerUtils.Debug("[actionevent] TrackAdFailToLoad:"+JsonMapper.ToJson(dic));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdFailToShow(PlatformType adPlatform, AdsType adFormat, string reason, string pos)
|
public static void TrackAdFailToShow(AdsType adFormat, string pos, AdsShowFailType adShowFailType)
|
||||||
{
|
{
|
||||||
AdPlayCountManager.IncrementAdsActionCount(adFormat, AdPlayCountManager.SHOWFAIL_COUNT_SUFFIX);
|
AdPlayCountManager.IncrementAdsActionCount(adFormat, AdPlayCountManager.SHOWFAIL_COUNT_SUFFIX);
|
||||||
AdsSDKManager.Instance.otherAdsOnShow = false;
|
AdsSDKManager.Instance.otherAdsOnShow = false;
|
||||||
var eventName = "ad_show_fail";
|
var eventName = "ad_show_fail";
|
||||||
var dic = new Dictionary<string, object> {
|
var dic = new Dictionary<string, object> {
|
||||||
{ "ad_platform", adPlatform.ToString()},
|
|
||||||
{ "ad_format", adFormat.ToString()},
|
{ "ad_format", adFormat.ToString()},
|
||||||
{ "reason", reason},
|
{ "reason", adShowFailType.ToString()},
|
||||||
{ "position", pos},
|
{ "position", pos},
|
||||||
{ "number",AdPlayCountManager.GetAdsActionCount(adFormat,AdPlayCountManager.SHOWFAIL_COUNT_SUFFIX)}
|
{ "number",AdPlayCountManager.GetAdsActionCount(adFormat,AdPlayCountManager.SHOWFAIL_COUNT_SUFFIX)}
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,7 +49,6 @@ namespace WZ
|
||||||
KwaiAdsManager.Instance._ivCloseCallback?.Invoke(0);
|
KwaiAdsManager.Instance._ivCloseCallback?.Invoke(0);
|
||||||
KwaiAdsManager.Instance._ivCloseCallback = null;
|
KwaiAdsManager.Instance._ivCloseCallback = null;
|
||||||
KwaiAdsManager.Instance.LoadInterstitial();
|
KwaiAdsManager.Instance.LoadInterstitial();
|
||||||
AdsActionEvents.TrackAdFailToShow(KwaiAdsManager.Instance.Platfrom,AdsType.Interstitial,msg,"");
|
|
||||||
LoggerUtils.Debug($"[kwai] RewardAdListener#OnAdShowFailed , code:{code}, msg:{msg}");
|
LoggerUtils.Debug($"[kwai] RewardAdListener#OnAdShowFailed , code:{code}, msg:{msg}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ namespace WZ
|
||||||
KwaiAdsManager.Instance._rvShowFailedCallback?.Invoke();
|
KwaiAdsManager.Instance._rvShowFailedCallback?.Invoke();
|
||||||
KwaiAdsManager.Instance._rvShowFailedCallback = null;
|
KwaiAdsManager.Instance._rvShowFailedCallback = null;
|
||||||
KwaiAdsManager.Instance.LoadRewarded();
|
KwaiAdsManager.Instance.LoadRewarded();
|
||||||
AdsActionEvents.TrackAdFailToShow(KwaiAdsManager.Instance.Platfrom,AdsType.Rewarded,msg,"");
|
|
||||||
LoggerUtils.Debug($"[kwai] RewardAdListener#OnAdShowFailed , code:{code}, msg:{msg}");
|
LoggerUtils.Debug($"[kwai] RewardAdListener#OnAdShowFailed , code:{code}, msg:{msg}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,6 @@ namespace WZ
|
||||||
_rvShowFailedCallback?.Invoke();
|
_rvShowFailedCallback?.Invoke();
|
||||||
_rvShowFailedCallback = null;
|
_rvShowFailedCallback = null;
|
||||||
LoadRewarded();
|
LoadRewarded();
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom,AdsType.Rewarded,errorInfo.Message,_rvPos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRewardedAdHiddenEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private void OnRewardedAdHiddenEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
|
@ -245,7 +244,6 @@ namespace WZ
|
||||||
_ivCloseCallback?.Invoke(0);
|
_ivCloseCallback?.Invoke(0);
|
||||||
_ivCloseCallback = null;
|
_ivCloseCallback = null;
|
||||||
LoadInterstitial();
|
LoadInterstitial();
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom,AdsType.Interstitial,errorInfo.Message,"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInterstitialDisplayedEvent(string adUnitId, MaxSdkBase.AdInfo info)
|
private void OnInterstitialDisplayedEvent(string adUnitId, MaxSdkBase.AdInfo info)
|
||||||
|
|
|
@ -172,12 +172,6 @@ namespace WZ
|
||||||
private void OnAdVideoFailureEvent(object sender, ATAdErrorEventArgs erg)
|
private void OnAdVideoFailureEvent(object sender, ATAdErrorEventArgs erg)
|
||||||
{
|
{
|
||||||
LoggerUtils.Debug("[Tpn] 广告播放失败" + JsonMapper.ToJson(erg.callbackInfo.toDictionary()));
|
LoggerUtils.Debug("[Tpn] 广告播放失败" + JsonMapper.ToJson(erg.callbackInfo.toDictionary()));
|
||||||
|
|
||||||
AdsActionEvents.TrackAdFailToShow(Platfrom,
|
|
||||||
erg.placementId.Equals(_topon_rewarded_units) ? AdsType.Rewarded : AdsType.Interstitial,
|
|
||||||
erg.errorMessage,
|
|
||||||
erg.placementId.Equals(_topon_rewarded_units) ? _rvPos : "");
|
|
||||||
|
|
||||||
ThreadUtils.QueueOnMainThread(pObj =>
|
ThreadUtils.QueueOnMainThread(pObj =>
|
||||||
{
|
{
|
||||||
if (erg.placementId.Equals(_topon_rewarded_units))
|
if (erg.placementId.Equals(_topon_rewarded_units))
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Rewarded, position, AdsShowFailType.NoFill);
|
||||||
callback?.Invoke(false, 0);
|
callback?.Invoke(false, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,11 +115,13 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Interstitial, position, AdsShowFailType.NoFill);
|
||||||
callback?.Invoke(-1);
|
callback?.Invoke(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Interstitial, position, AdsShowFailType.RuleLimit);
|
||||||
callback?.Invoke(-1);
|
callback?.Invoke(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +133,10 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
{
|
{
|
||||||
AdsSDKManager.Instance.ShowBanner();
|
AdsSDKManager.Instance.ShowBanner();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Banner, "", AdsShowFailType.NoFill);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +156,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
||||||
if (!IsNativeFullReady())
|
if (!IsNativeFullReady())
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,6 +187,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
||||||
if (!IsNativeReady())
|
if (!IsNativeReady())
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,6 +218,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
||||||
if (!IsSmallNativeReady())
|
if (!IsSmallNativeReady())
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +249,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
||||||
if (!IsSmallNativeReady())
|
if (!IsSmallNativeReady())
|
||||||
{
|
{
|
||||||
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue