max firebase/数数 广告收益上报
This commit is contained in:
parent
f52eb7be05
commit
1f44d8263d
|
|
@ -65,7 +65,7 @@ public class AdsSDKManager : NormalSingleton<AdsSDKManager>
|
||||||
|
|
||||||
PlatformType result = GetBestPlatformType(false);
|
PlatformType result = GetBestPlatformType(false);
|
||||||
BidPlatformManager.Instance.RecordBidSuccess(result, AdsType.Rewarded);
|
BidPlatformManager.Instance.RecordBidSuccess(result, AdsType.Rewarded);
|
||||||
if (result == PlatformType.Max)
|
if (result == PlatformType.AppLovin)
|
||||||
{
|
{
|
||||||
MaxAdsManager.Instance.DisplayRewarded(_adPos, _rewardCallback, _showFailedCallback);
|
MaxAdsManager.Instance.DisplayRewarded(_adPos, _rewardCallback, _showFailedCallback);
|
||||||
}
|
}
|
||||||
|
|
@ -77,7 +77,7 @@ public class AdsSDKManager : NormalSingleton<AdsSDKManager>
|
||||||
{
|
{
|
||||||
BigoAdsManager.Instance.DisplayRewarded(_adPos, _rewardCallback, _showFailedCallback);
|
BigoAdsManager.Instance.DisplayRewarded(_adPos, _rewardCallback, _showFailedCallback);
|
||||||
}
|
}
|
||||||
else if (result == PlatformType.Tpn)
|
else if (result == PlatformType.Topon)
|
||||||
{
|
{
|
||||||
TpnAdsManager.Instance.DisplayRewarded(_adPos, _rewardCallback, _showFailedCallback);
|
TpnAdsManager.Instance.DisplayRewarded(_adPos, _rewardCallback, _showFailedCallback);
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +112,7 @@ public class AdsSDKManager : NormalSingleton<AdsSDKManager>
|
||||||
|
|
||||||
PlatformType result = GetBestPlatformType(true);
|
PlatformType result = GetBestPlatformType(true);
|
||||||
BidPlatformManager.Instance.RecordBidSuccess(result, AdsType.Interstitial);
|
BidPlatformManager.Instance.RecordBidSuccess(result, AdsType.Interstitial);
|
||||||
if (result == PlatformType.Max)
|
if (result == PlatformType.AppLovin)
|
||||||
{
|
{
|
||||||
MaxAdsManager.Instance.DisplayInterstitial(_adPos, _IvType,_closeCallback);
|
MaxAdsManager.Instance.DisplayInterstitial(_adPos, _IvType,_closeCallback);
|
||||||
}
|
}
|
||||||
|
|
@ -124,7 +124,7 @@ public class AdsSDKManager : NormalSingleton<AdsSDKManager>
|
||||||
{
|
{
|
||||||
BigoAdsManager.Instance.DisplayInterstitial(_adPos, _IvType, _closeCallback);
|
BigoAdsManager.Instance.DisplayInterstitial(_adPos, _IvType, _closeCallback);
|
||||||
}
|
}
|
||||||
else if (result == PlatformType.Tpn)
|
else if (result == PlatformType.Topon)
|
||||||
{
|
{
|
||||||
TpnAdsManager.Instance.DisplayInterstitial(_adPos, _IvType, _closeCallback);
|
TpnAdsManager.Instance.DisplayInterstitial(_adPos, _IvType, _closeCallback);
|
||||||
}
|
}
|
||||||
|
|
@ -193,10 +193,10 @@ public class AdsSDKManager : NormalSingleton<AdsSDKManager>
|
||||||
case PlatformType.Admob:
|
case PlatformType.Admob:
|
||||||
RefreshAdmobAds(adType);
|
RefreshAdmobAds(adType);
|
||||||
break;
|
break;
|
||||||
case PlatformType.Tpn:
|
case PlatformType.Topon:
|
||||||
RefreshTopOnAds(adType);
|
RefreshTopOnAds(adType);
|
||||||
break;
|
break;
|
||||||
case PlatformType.Max:
|
case PlatformType.AppLovin:
|
||||||
RefreshMaxAds(adType);
|
RefreshMaxAds(adType);
|
||||||
break;
|
break;
|
||||||
case PlatformType.Bigo:
|
case PlatformType.Bigo:
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ namespace DKManager.AdsSDKManager.Constant
|
||||||
{
|
{
|
||||||
public enum PlatformType
|
public enum PlatformType
|
||||||
{
|
{
|
||||||
Max,
|
AppLovin,
|
||||||
Tpn,
|
Topon,
|
||||||
Admob,
|
Admob,
|
||||||
Bigo,
|
Bigo,
|
||||||
Kwai,
|
Kwai,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Net.Security;
|
||||||
|
using Firebase.Analytics;
|
||||||
using Script.Common;
|
using Script.Common;
|
||||||
using Script.SDKManager.AdsSDKManager.Utils;
|
using Script.SDKManager.AdsSDKManager.Utils;
|
||||||
using Script.Utils;
|
using Script.Utils;
|
||||||
|
|
@ -12,7 +14,7 @@ namespace Script.SDKManager.AdsSDKManager.MaxAdsManager
|
||||||
{
|
{
|
||||||
public class MaxAdsManager : NormalSingleton<MaxAdsManager>, IAdService
|
public class MaxAdsManager : NormalSingleton<MaxAdsManager>, IAdService
|
||||||
{
|
{
|
||||||
public string ClientName => "Max";
|
public string ClientName => "AppLovin";
|
||||||
private string max_app_key;
|
private string max_app_key;
|
||||||
private string max_interstitial_units;
|
private string max_interstitial_units;
|
||||||
private string max_rewarded_units;
|
private string max_rewarded_units;
|
||||||
|
|
@ -97,7 +99,7 @@ namespace Script.SDKManager.AdsSDKManager.MaxAdsManager
|
||||||
private void OnRewardedRevenue(string adunit, MaxSdkBase.AdInfo adInfo)
|
private void OnRewardedRevenue(string adunit, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
LoggerUtils.Debug("[Max] OnRewardedRevenue network: " + adInfo.NetworkName + " revenue: " + adInfo.Revenue + " NetworkPlacement: " + adInfo.NetworkPlacement + " AdUnitIdentifier: " + adInfo.AdUnitIdentifier + " Placement: " + adInfo.Placement);
|
LoggerUtils.Debug("[Max] OnRewardedRevenue network: " + adInfo.NetworkName + " revenue: " + adInfo.Revenue + " NetworkPlacement: " + adInfo.NetworkPlacement + " AdUnitIdentifier: " + adInfo.AdUnitIdentifier + " Placement: " + adInfo.Placement);
|
||||||
AdjustTrackEvent.Instance.TrackAdEvent(adInfo.Revenue,adInfo.NetworkName,adInfo.AdUnitIdentifier,adInfo.Placement);
|
TrackAdImpression(adInfo, AdsType.Rewarded);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRewardedAdLoadedEvent(string adunit, MaxSdkBase.AdInfo adInfo)
|
private void OnRewardedAdLoadedEvent(string adunit, MaxSdkBase.AdInfo adInfo)
|
||||||
|
|
@ -224,7 +226,7 @@ namespace Script.SDKManager.AdsSDKManager.MaxAdsManager
|
||||||
private void OnInterstitialRevenue(string adunit, MaxSdkBase.AdInfo adInfo)
|
private void OnInterstitialRevenue(string adunit, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
LoggerUtils.Debug("[Max] OnInterstitialRevenue network: " + adInfo.NetworkName + " revenue: " + adInfo.Revenue + " NetworkPlacement: " + adInfo.NetworkPlacement + " AdUnitIdentifier: " + adInfo.AdUnitIdentifier + " Placement: " + adInfo.Placement);
|
LoggerUtils.Debug("[Max] OnInterstitialRevenue network: " + adInfo.NetworkName + " revenue: " + adInfo.Revenue + " NetworkPlacement: " + adInfo.NetworkPlacement + " AdUnitIdentifier: " + adInfo.AdUnitIdentifier + " Placement: " + adInfo.Placement);
|
||||||
AdjustTrackEvent.Instance.TrackAdEvent(adInfo.Revenue,adInfo.NetworkName,adInfo.AdUnitIdentifier,adInfo.Placement);
|
TrackAdImpression(adInfo, AdsType.Interstitial);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -253,5 +255,33 @@ namespace Script.SDKManager.AdsSDKManager.MaxAdsManager
|
||||||
public double GetBannerRevenue() { return 0; }
|
public double GetBannerRevenue() { return 0; }
|
||||||
public void DisplayBanner() { }
|
public void DisplayBanner() { }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 广告收益上报
|
||||||
|
public void TrackAdImpression(MaxSdkBase.AdInfo adInfo, AdsType type)
|
||||||
|
{
|
||||||
|
AdjustTrackEvent.Instance.TrackAdEvent(adInfo.Revenue,
|
||||||
|
adInfo.NetworkName,
|
||||||
|
adInfo.AdUnitIdentifier,
|
||||||
|
adInfo.Placement);
|
||||||
|
|
||||||
|
FireBaseAnalyticsManager.Instance.OnAdRevenueEvent(ClientName,
|
||||||
|
adInfo.NetworkName,
|
||||||
|
adInfo.AdUnitIdentifier,
|
||||||
|
type.ToString(),
|
||||||
|
adInfo.Revenue,
|
||||||
|
type == AdsType.Rewarded ? _rvPos : "",
|
||||||
|
AdPlayCountManager.GetAdPlayCount(type));
|
||||||
|
|
||||||
|
ShuShuEvent.Instance.OnAdRevenueEvent(ClientName,
|
||||||
|
adInfo.NetworkName,
|
||||||
|
adInfo.AdUnitIdentifier,
|
||||||
|
type.ToString(),
|
||||||
|
adInfo.Revenue,
|
||||||
|
type == AdsType.Rewarded ? _rvPos : "",
|
||||||
|
AdPlayCountManager.GetAdPlayCount(type));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ namespace Script.SDKManager.AdsSDKManager.Utils
|
||||||
_bidExpireInSec = expireInSec;
|
_bidExpireInSec = expireInSec;
|
||||||
_platformStates.Clear();
|
_platformStates.Clear();
|
||||||
_platformStates.Add(PlatformType.Admob, new BidPlatformState(PlatformType.Admob));
|
_platformStates.Add(PlatformType.Admob, new BidPlatformState(PlatformType.Admob));
|
||||||
_platformStates.Add(PlatformType.Tpn, new BidPlatformState(PlatformType.Tpn));
|
_platformStates.Add(PlatformType.Topon, new BidPlatformState(PlatformType.Topon));
|
||||||
_platformStates.Add(PlatformType.Max, new BidPlatformState(PlatformType.Max));
|
_platformStates.Add(PlatformType.AppLovin, new BidPlatformState(PlatformType.AppLovin));
|
||||||
_platformStates.Add(PlatformType.Bigo, new BidPlatformState(PlatformType.Bigo));
|
_platformStates.Add(PlatformType.Bigo, new BidPlatformState(PlatformType.Bigo));
|
||||||
_platformStates.Add(PlatformType.Kwai, new BidPlatformState(PlatformType.Kwai));
|
_platformStates.Add(PlatformType.Kwai, new BidPlatformState(PlatformType.Kwai));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue