修复Native上报position
This commit is contained in:
parent
6cf186d474
commit
c164fa4a46
|
|
@ -24,6 +24,7 @@ namespace WZ
|
||||||
private List<string> _bannerAdUnits = new List<string>();
|
private List<string> _bannerAdUnits = new List<string>();
|
||||||
private string _rvPos;
|
private string _rvPos;
|
||||||
private string _ivPos;
|
private string _ivPos;
|
||||||
|
private string _naPos;
|
||||||
private Action<bool,double> _rvCloseCallback = null;
|
private Action<bool,double> _rvCloseCallback = null;
|
||||||
private Action<double> _ivCloseCallback = null;
|
private Action<double> _ivCloseCallback = null;
|
||||||
private Action _rvShowFailedCallback = null;
|
private Action _rvShowFailedCallback = null;
|
||||||
|
|
@ -314,7 +315,7 @@ namespace WZ
|
||||||
|
|
||||||
public void DisplayNative(string _adPos, string adUnitId, NativeAdPosition position)
|
public void DisplayNative(string _adPos, string adUnitId, NativeAdPosition position)
|
||||||
{
|
{
|
||||||
|
_naPos = _adPos;
|
||||||
_admobNativeAdManager.ShowAd(position, adUnitId);
|
_admobNativeAdManager.ShowAd(position, adUnitId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -395,12 +396,20 @@ namespace WZ
|
||||||
placement,
|
placement,
|
||||||
loadedAdapterResponseInfo.AdSourceInstanceName);
|
loadedAdapterResponseInfo.AdSourceInstanceName);
|
||||||
|
|
||||||
|
var position = type switch
|
||||||
|
{
|
||||||
|
AdsType.Rewarded => _rvPos,
|
||||||
|
AdsType.Interstitial => _ivPos,
|
||||||
|
AdsType.Native => _naPos,
|
||||||
|
_ => ""
|
||||||
|
};
|
||||||
|
|
||||||
FireBaseAnalyticsManager.Instance.OnAdRevenueEvent(PlatformType.Admob.ToString(),
|
FireBaseAnalyticsManager.Instance.OnAdRevenueEvent(PlatformType.Admob.ToString(),
|
||||||
loadedAdapterResponseInfo.AdSourceName,
|
loadedAdapterResponseInfo.AdSourceName,
|
||||||
placement,
|
placement,
|
||||||
type,
|
type,
|
||||||
adValue.Value / 1000000f,
|
adValue.Value / 1000000f,
|
||||||
type == AdsType.Rewarded ? _rvPos : _ivPos,
|
position,
|
||||||
AdPlayCountManager.GetAdsActionCount(type, AdPlayCountManager.PLAY_COUNT_SUFFIX));
|
AdPlayCountManager.GetAdsActionCount(type, AdPlayCountManager.PLAY_COUNT_SUFFIX));
|
||||||
|
|
||||||
ShuShuEvent.Instance.OnAdRevenueEvent(PlatformType.Admob.ToString(),
|
ShuShuEvent.Instance.OnAdRevenueEvent(PlatformType.Admob.ToString(),
|
||||||
|
|
@ -408,7 +417,7 @@ namespace WZ
|
||||||
placement,
|
placement,
|
||||||
type.ToString(),
|
type.ToString(),
|
||||||
adValue.Value / 1000000f,
|
adValue.Value / 1000000f,
|
||||||
type == AdsType.Rewarded ? _rvPos : _ivPos,
|
position,
|
||||||
AdPlayCountManager.GetAdsActionCount(type, AdPlayCountManager.PLAY_COUNT_SUFFIX));
|
AdPlayCountManager.GetAdsActionCount(type, AdPlayCountManager.PLAY_COUNT_SUFFIX));
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Build from HY-LSZNWIN10 at 2025/9/9 14:18:36
|
Build from HY-LSZNWIN10 at 2025/9/9 14:28:41
|
||||||
Loading…
Reference in New Issue