topon firebase/数数 广告收益上报

This commit is contained in:
juncong lee 2025-08-31 20:54:15 +08:00
parent 1f44d8263d
commit edc7ba49ff
2 changed files with 50 additions and 28 deletions

View File

@ -280,8 +280,6 @@ namespace Script.SDKManager.AdsSDKManager.MaxAdsManager
type == AdsType.Rewarded ? _rvPos : "", type == AdsType.Rewarded ? _rvPos : "",
AdPlayCountManager.GetAdPlayCount(type)); AdPlayCountManager.GetAdPlayCount(type));
} }
#endregion #endregion
} }
} }

View File

@ -57,7 +57,7 @@ namespace Script.SDKManager.AdsSDKManager.TpnAdsManager
ATRewardedAutoVideo.Instance.addAutoLoadAdPlacementID(new string[] { topon_rewarded_units }); ATRewardedAutoVideo.Instance.addAutoLoadAdPlacementID(new string[] { topon_rewarded_units });
} }
public void LoadRewarded() {} public void LoadRewarded() { }
public void DisplayRewarded(string adPos, Action<bool> rewardCallback = null, Action showFailedCallback = null) public void DisplayRewarded(string adPos, Action<bool> rewardCallback = null, Action showFailedCallback = null)
{ {
_rvPos = adPos; _rvPos = adPos;
@ -88,8 +88,8 @@ namespace Script.SDKManager.AdsSDKManager.TpnAdsManager
ATInterstitialAutoAd.Instance.addAutoLoadAdPlacementID(new string[] { topon_interstitial_units }); ATInterstitialAutoAd.Instance.addAutoLoadAdPlacementID(new string[] { topon_interstitial_units });
} }
public void LoadInterstitial(){} public void LoadInterstitial() { }
public double GetInterstitialRevenue(){return 0;} public double GetInterstitialRevenue() { return 0; }
public void DisplayInterstitial(string ivPos, IvType _IvType = IvType.IV1, Action closeCallback = null) public void DisplayInterstitial(string ivPos, IvType _IvType = IvType.IV1, Action closeCallback = null)
{ {
@ -125,11 +125,9 @@ namespace Script.SDKManager.AdsSDKManager.TpnAdsManager
private void OnAdVideoStartEvent(object sender, ATAdEventArgs erg) private void OnAdVideoStartEvent(object sender, ATAdEventArgs erg)
{ {
LoggerUtils.Debug("[Tpn] 广告开始播放:" + JsonMapper.ToJson(erg.callbackInfo.toDictionary())); LoggerUtils.Debug("[Tpn] 广告开始播放:" + JsonMapper.ToJson(erg.callbackInfo.toDictionary()));
// todo
AdjustTrackEvent.Instance.TrackAdEvent(erg.callbackInfo.publisher_revenue, TrackAdImpression(erg);
"Topon_" +erg.callbackInfo.network_firm_id,
erg.callbackInfo.adunit_id,
erg.callbackInfo.network_placement_id);
ThreadUtils.QueueOnMainThread(pObj => ThreadUtils.QueueOnMainThread(pObj =>
{ {
if (erg.placementId.Equals(topon_rewarded_units)) if (erg.placementId.Equals(topon_rewarded_units))
@ -202,26 +200,52 @@ namespace Script.SDKManager.AdsSDKManager.TpnAdsManager
#region 广 #region 广
public void LoadSplash() { } public void LoadSplash() { }
public bool IsSplashAvailable() { return false; } public bool IsSplashAvailable() { return false; }
public void DisplaySplash(){} public void DisplaySplash() { }
public double GetSplashRevenue() {return 0;} public double GetSplashRevenue() { return 0; }
#endregion #endregion
#region 广 #region 广
public void LoadNative(){} public void LoadNative() { }
public double GetNativeRevenue() {return 0;} public double GetNativeRevenue() { return 0; }
public void DisplayNative(NativeAdPosition position){} public void DisplayNative(NativeAdPosition position) { }
public bool IsNativeAvailable(){return false;} public bool IsNativeAvailable() { return false; }
public void RemoveNative(){} public void RemoveNative() { }
#endregion #endregion
#region 广 #region 广
public void LoadBanner(){} public void LoadBanner() { }
public bool IsBannerAvailable(){return false;} public bool IsBannerAvailable() { return false; }
public void HideBanner(){} public void HideBanner() { }
public double GetBannerRevenue(){return 0;} public double GetBannerRevenue() { return 0; }
public void DisplayBanner(){} public void DisplayBanner() { }
#endregion #endregion
#region 广
public void TrackAdImpression(ATAdEventArgs erg)
{
AdjustTrackEvent.Instance.TrackAdEvent(erg.callbackInfo.publisher_revenue,
ClientName + "_" + erg.callbackInfo.network_firm_id,
erg.callbackInfo.adunit_id,
erg.callbackInfo.network_placement_id);
FireBaseAnalyticsManager.Instance.OnAdRevenueEvent(ClientName,
ClientName + "_" + erg.callbackInfo.network_firm_id,
erg.callbackInfo.adunit_id,
erg.placementId.Equals(topon_rewarded_units) ? AdsType.Rewarded.ToString() : AdsType.Interstitial.ToString(),
erg.callbackInfo.publisher_revenue,
erg.placementId.Equals(topon_rewarded_units) ? _rvPos : "",
AdPlayCountManager.GetAdPlayCount(erg.placementId.Equals(topon_rewarded_units) ? AdsType.Rewarded : AdsType.Interstitial));
ShuShuEvent.Instance.OnAdRevenueEvent(ClientName,
ClientName + "_" + erg.callbackInfo.network_firm_id,
erg.callbackInfo.adunit_id,
erg.placementId.Equals(topon_rewarded_units) ? AdsType.Rewarded.ToString() : AdsType.Interstitial.ToString(),
erg.callbackInfo.publisher_revenue,
erg.placementId.Equals(topon_rewarded_units) ? _rvPos : "",
AdPlayCountManager.GetAdPlayCount(erg.placementId.Equals(topon_rewarded_units) ? AdsType.Rewarded : AdsType.Interstitial));
}
} }
} }