Merge branch 'main' of http://v4.9ms.co:7777/yufeng/SDK_UnityMoney
This commit is contained in:
commit
c497436a55
|
@ -53,7 +53,7 @@ namespace WZ
|
||||||
network.RefreshAdsData();
|
network.RefreshAdsData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#region 激励视频广告
|
||||||
public bool IsRewardAdReady()
|
public bool IsRewardAdReady()
|
||||||
{
|
{
|
||||||
return _adNetworks.Any(network => network.IsRewardedAvailable());
|
return _adNetworks.Any(network => network.IsRewardedAvailable());
|
||||||
|
@ -63,7 +63,7 @@ namespace WZ
|
||||||
/// 展示激励广告
|
/// 展示激励广告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="callback"></param>
|
/// <param name="callback"></param>
|
||||||
public void ShowRewardAd(string _adPos, Action<bool,double> _rewardCallback = null, Action _showFailedCallback = null)
|
public void ShowRewardAd(string _adPos, Action<bool, double> _rewardCallback = null, Action _showFailedCallback = null)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Rewarded, _adPos);
|
AdsActionEvents.TrackAdPosition(AdsType.Rewarded, _adPos);
|
||||||
if (!IsRewardAdReady())
|
if (!IsRewardAdReady())
|
||||||
|
@ -100,7 +100,9 @@ namespace WZ
|
||||||
AdPlayCountManager.IncrementAdPlayCount(AdsType.Rewarded);
|
AdPlayCountManager.IncrementAdPlayCount(AdsType.Rewarded);
|
||||||
CheckAndRefreshExpiredBids(AdsType.Rewarded);
|
CheckAndRefreshExpiredBids(AdsType.Rewarded);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 插屏广告
|
||||||
public bool IsInterstitialReady()
|
public bool IsInterstitialReady()
|
||||||
{
|
{
|
||||||
return _adNetworks.Any(network => network.IsInterstitialAvailable());
|
return _adNetworks.Any(network => network.IsInterstitialAvailable());
|
||||||
|
@ -151,6 +153,51 @@ namespace WZ
|
||||||
// 刷新其他类型广告
|
// 刷新其他类型广告
|
||||||
CheckAndRefreshExpiredBids(AdsType.Interstitial);
|
CheckAndRefreshExpiredBids(AdsType.Interstitial);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 横幅广告
|
||||||
|
public bool IsBannerAdReady()
|
||||||
|
{
|
||||||
|
return AdmobAdsManager.Instance.IsBannerAvailable();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowBanner()
|
||||||
|
{
|
||||||
|
AdsActionEvents.TrackAdPosition(AdsType.Interstitial, "");
|
||||||
|
if (IsBannerAdReady())
|
||||||
|
{
|
||||||
|
AdmobAdsManager.Instance.DisplayBanner();
|
||||||
|
AdPlayCountManager.IncrementAdPlayCount(AdsType.Banner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideBanner()
|
||||||
|
{
|
||||||
|
AdmobAdsManager.Instance.HideBanner();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 原生广告
|
||||||
|
public bool IsNativeAdReady()
|
||||||
|
{
|
||||||
|
return AdmobAdsManager.Instance.IsNativeAvailable();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowNativeAd(NativeAdPosition position)
|
||||||
|
{
|
||||||
|
if (IsNativeAdReady())
|
||||||
|
{
|
||||||
|
AdmobAdsManager.Instance.DisplayNative(position);
|
||||||
|
AdPlayCountManager.IncrementAdPlayCount(AdsType.Native);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveNativeAd()
|
||||||
|
{
|
||||||
|
AdmobAdsManager.Instance.RemoveNative();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 开屏广告
|
#region 开屏广告
|
||||||
public bool IsSplashAvailable()
|
public bool IsSplashAvailable()
|
||||||
|
@ -197,7 +244,80 @@ namespace WZ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查并刷新过期竞价
|
/// <summary>
|
||||||
|
/// 广告看完回调
|
||||||
|
/// </summary>
|
||||||
|
public void OnRewardAdCallback(double price)
|
||||||
|
{
|
||||||
|
AdRewardCallback?.Invoke(price);
|
||||||
|
AdRewardCallback = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据IvRules判断是否可以展示插屏
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool IvRulesShow(IvType ivadType)
|
||||||
|
{
|
||||||
|
//1.获取远程配置
|
||||||
|
string json = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("IV_RULES");
|
||||||
|
if (string.IsNullOrEmpty(json))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//2.解析配置
|
||||||
|
var dates = JsonConvert.DeserializeObject<IvRulesData[]>(json);
|
||||||
|
if (dates == null && dates.Length == 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//3.获取IVADType对应的配置
|
||||||
|
IvRulesData ivRulesData = null;
|
||||||
|
foreach (var data in dates)
|
||||||
|
{
|
||||||
|
if (data.type == (int)ivadType)
|
||||||
|
{
|
||||||
|
ivRulesData = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ivRulesData == null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
//4.判断skip(次安装跳过几次触发不展示广告)
|
||||||
|
int skipLevel = ivRulesData.skipLevel;
|
||||||
|
int currentSkipLevel = PlayerPrefsUtils.GetPlayerPrefsInt(IvRulesKey.KEY_SKIPLEVEL, 0);
|
||||||
|
if (currentSkipLevel < skipLevel)
|
||||||
|
{
|
||||||
|
LoggerUtils.Debug($"[SDK] skipLevel limit");
|
||||||
|
PlayerPrefsUtils.SavePlayerPrefsInt(IvRulesKey.KEY_SKIPLEVEL, currentSkipLevel + 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//5.判断overLevel(没跳过几次触发)
|
||||||
|
int overLevel = ivRulesData.overLevel;
|
||||||
|
int currentOverLevel = IvRulesConst.CurrentOverLevel;
|
||||||
|
if (currentOverLevel < overLevel)
|
||||||
|
{
|
||||||
|
LoggerUtils.Debug($"[SDK] overLevel limit");
|
||||||
|
IvRulesConst.CurrentOverLevel++;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//6.判断interval(广告时间间隔)
|
||||||
|
int interval = ivRulesData.interval;
|
||||||
|
long currentInterval = IvRulesConst.CurrentInterval;
|
||||||
|
long localTimestamp = TimeUtils.GetLocalTimestamp();
|
||||||
|
|
||||||
|
if (localTimestamp < currentInterval + (interval * 1000L))
|
||||||
|
{
|
||||||
|
LoggerUtils.Debug($"[SDK] interval limit");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 检查并刷新过期竞价
|
||||||
private void CheckAndRefreshExpiredBids(AdsType _adsType)
|
private void CheckAndRefreshExpiredBids(AdsType _adsType)
|
||||||
{
|
{
|
||||||
Dictionary<PlatformType, List<AdsType>> expiredBids = BidPlatformManager.Instance.GetExpiredBids();
|
Dictionary<PlatformType, List<AdsType>> expiredBids = BidPlatformManager.Instance.GetExpiredBids();
|
||||||
|
@ -327,78 +447,6 @@ namespace WZ
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
/// <summary>
|
|
||||||
/// 广告看完回调
|
|
||||||
/// </summary>
|
|
||||||
public void OnRewardAdCallback(double price)
|
|
||||||
{
|
|
||||||
AdRewardCallback?.Invoke(price);
|
|
||||||
AdRewardCallback = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 根据IvRules判断是否可以展示插屏
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool IvRulesShow(IvType ivadType)
|
|
||||||
{
|
|
||||||
//1.获取远程配置
|
|
||||||
string json = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("IV_RULES");
|
|
||||||
if (string.IsNullOrEmpty(json))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
//2.解析配置
|
|
||||||
var dates = JsonConvert.DeserializeObject<IvRulesData[]>(json);
|
|
||||||
if (dates == null && dates.Length == 0)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
//3.获取IVADType对应的配置
|
|
||||||
IvRulesData ivRulesData = null;
|
|
||||||
foreach (var data in dates)
|
|
||||||
{
|
|
||||||
if (data.type == (int)ivadType)
|
|
||||||
{
|
|
||||||
ivRulesData = data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ivRulesData == null)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
//4.判断skip(次安装跳过几次触发不展示广告)
|
|
||||||
int skipLevel = ivRulesData.skipLevel;
|
|
||||||
int currentSkipLevel = PlayerPrefsUtils.GetPlayerPrefsInt(IvRulesKey.KEY_SKIPLEVEL, 0);
|
|
||||||
if (currentSkipLevel < skipLevel)
|
|
||||||
{
|
|
||||||
LoggerUtils.Debug($"[SDK] skipLevel limit");
|
|
||||||
PlayerPrefsUtils.SavePlayerPrefsInt(IvRulesKey.KEY_SKIPLEVEL, currentSkipLevel + 1);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//5.判断overLevel(没跳过几次触发)
|
|
||||||
int overLevel = ivRulesData.overLevel;
|
|
||||||
int currentOverLevel = IvRulesConst.CurrentOverLevel;
|
|
||||||
if (currentOverLevel < overLevel)
|
|
||||||
{
|
|
||||||
LoggerUtils.Debug($"[SDK] overLevel limit");
|
|
||||||
IvRulesConst.CurrentOverLevel++;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//6.判断interval(广告时间间隔)
|
|
||||||
int interval = ivRulesData.interval;
|
|
||||||
long currentInterval = IvRulesConst.CurrentInterval;
|
|
||||||
long localTimestamp = TimeUtils.GetLocalTimestamp();
|
|
||||||
|
|
||||||
if (localTimestamp < currentInterval + (interval * 1000L))
|
|
||||||
{
|
|
||||||
LoggerUtils.Debug($"[SDK] interval limit");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Firebase.Analytics;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,42 +10,124 @@ namespace WZ
|
||||||
{
|
{
|
||||||
public static void TrackAdClicked(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, string posotion, double value)
|
public static void TrackAdClicked(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, string posotion, double value)
|
||||||
{
|
{
|
||||||
|
var eventName = "ad_click";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_source", adSource},
|
||||||
|
{ "ad_unit_name", adUnitName},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "position", posotion},
|
||||||
|
{ "value", value},
|
||||||
|
{ "currency","USD"},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdClosed(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, string posotion, double value)
|
public static void TrackAdClosed(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, string posotion, double value)
|
||||||
{
|
{
|
||||||
AdsSDKManager.Instance.otherAdsOnShow = false;
|
AdsSDKManager.Instance.otherAdsOnShow = false;
|
||||||
|
var eventName = "ad_close";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_source", adSource},
|
||||||
|
{ "ad_unit_name", adUnitName},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "position", posotion},
|
||||||
|
{ "value", value},
|
||||||
|
{ "currency","USD"},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdStartLoad(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat)
|
public static void TrackAdStartLoad(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat)
|
||||||
{
|
{
|
||||||
AdsSDKManager.Instance.otherAdsOnShow = true;
|
AdsSDKManager.Instance.otherAdsOnShow = true;
|
||||||
|
var eventName = "ad_start_load";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdLoaded(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, double loadTime)
|
public static void TrackAdLoaded(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, double loadTime)
|
||||||
{
|
{
|
||||||
|
var eventName = "ad_loaded";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_source", adSource},
|
||||||
|
{ "ad_unit_name", adUnitName},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "pass_time", loadTime},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
public static void TrackAdFailToLoad(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, double loadTime, string reason)
|
public static void TrackAdFailToLoad(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, double loadTime, string reason)
|
||||||
{
|
{
|
||||||
|
var eventName = "ad_load_fail";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_source", adSource},
|
||||||
|
{ "ad_unit_name", adUnitName},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "pass_time", loadTime},
|
||||||
|
{ "reason", reason},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdFailToShow(PlatformType adPlatform, AdsType adFormat, string reason, string pos)
|
public static void TrackAdFailToShow(PlatformType adPlatform, AdsType adFormat, string reason, string pos)
|
||||||
{
|
{
|
||||||
AdsSDKManager.Instance.otherAdsOnShow = false;
|
AdsSDKManager.Instance.otherAdsOnShow = false;
|
||||||
|
var eventName = "ad_show_fail";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "reason", reason},
|
||||||
|
{ "position", pos},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdPosition(AdsType adFormat, string pos)
|
public static void TrackAdPosition(AdsType adFormat, string pos)
|
||||||
{
|
{
|
||||||
|
var eventName = "ad_position";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "position", pos},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackAdImpression(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, string posotion, double value)
|
public static void TrackAdImpression(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, string posotion, double value)
|
||||||
{
|
{
|
||||||
|
var eventName = "ad_impression";
|
||||||
|
var dic = new Dictionary<string, object> {
|
||||||
|
{ "ad_platform", adPlatform.ToString()},
|
||||||
|
{ "ad_source", adSource},
|
||||||
|
{ "ad_unit_name", adUnitName},
|
||||||
|
{ "ad_format", adFormat.ToString()},
|
||||||
|
{ "position", posotion},
|
||||||
|
{ "value", value},
|
||||||
|
{ "currency","USD"},
|
||||||
|
{ "number",AdPlayCountManager.GetAdPlayCount(adFormat)}
|
||||||
|
};
|
||||||
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
|
||||||
|
ShuShuEvent.Instance.Track(eventName, dic);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,6 +36,21 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
|
|
||||||
#region ad
|
#region ad
|
||||||
|
|
||||||
|
public void ShowRewardAd(string position, Action<bool,double> callback = null)
|
||||||
|
{
|
||||||
|
bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady();
|
||||||
|
if (isRewardAdReady)
|
||||||
|
{
|
||||||
|
AdsSDKManager.Instance.ShowRewardAd(position, (isReward, revenue) =>
|
||||||
|
{
|
||||||
|
if (isReward)
|
||||||
|
{
|
||||||
|
//callback?.Invoke();
|
||||||
|
callback?.Invoke(true, revenue);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
public void ShowInterstitial(string position, IvType ivadType = IvType.IV1, Action<double> callback = null)
|
public void ShowInterstitial(string position, IvType ivadType = IvType.IV1, Action<double> callback = null)
|
||||||
{
|
{
|
||||||
//插屏展示逻辑
|
//插屏展示逻辑
|
||||||
|
@ -112,24 +127,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void ShowRewardAd(string position, Action<bool,double> callback = null)
|
|
||||||
{
|
|
||||||
bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady();
|
|
||||||
if (isRewardAdReady)
|
|
||||||
{
|
|
||||||
AdsSDKManager.Instance.ShowRewardAd(position, (isReward, revenue) =>
|
|
||||||
{
|
|
||||||
if (isReward)
|
|
||||||
{
|
|
||||||
//callback?.Invoke();
|
|
||||||
callback?.Invoke(true, revenue);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 在线参数
|
#region 在线参数
|
||||||
|
|
||||||
|
@ -151,7 +149,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue);
|
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetRemoteConfigString(string key, string defaultValue = "")
|
public string GetRemoteConfigStr(string key, string defaultValue = "")
|
||||||
{
|
{
|
||||||
if (Application.isEditor)
|
if (Application.isEditor)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,7 @@ namespace WZ
|
||||||
});
|
});
|
||||||
|
|
||||||
SetSDKEventCallback();
|
SetSDKEventCallback();
|
||||||
|
SetHdH5ImpressionCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetSDKEventCallback()
|
private void SetSDKEventCallback()
|
||||||
|
@ -44,5 +45,26 @@ namespace WZ
|
||||||
ShuShuEvent.Instance.Track(eventName, dict);
|
ShuShuEvent.Instance.Track(eventName, dict);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// <summary>
|
||||||
|
/// 互动广告展示回调,此时可以计算上报互动广告展示次数和收益
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="callback">string 是互动广告的url</param>
|
||||||
|
public void SetHdH5ImpressionCallback()
|
||||||
|
{
|
||||||
|
EFSdk.get().SetHdH5ImpressionCallback((url) =>
|
||||||
|
{
|
||||||
|
//TODO 判断是okspin还是appluck
|
||||||
|
string h5ad_okspinrev = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("H5ad_okspinrev", "0");
|
||||||
|
string h5ad_appluckrev= FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("H5ad_appluckrev", "0");
|
||||||
|
//TODO 上报
|
||||||
|
//adjust
|
||||||
|
//AdjustTrackEvent.Instance.TrackAdEvent();
|
||||||
|
//firebase
|
||||||
|
//FireBaseAnalyticsManager.Instance.OnAdRevenueEvent();
|
||||||
|
//数数
|
||||||
|
//ShuShuEvent.Instance.OnAdRevenueEvent();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue