Commit 03f2652b authored by maxiaoliang's avatar maxiaoliang

11

parent 378eb6e8
......@@ -52,7 +52,7 @@ object AdMaxEvent {
obj.put("networkplacement", ad?.networkPlacement)
obj.put("requestLatencyMillis", ad?.requestLatencyMillis)
obj.put("valueMicros", ad?.revenue)
if(!adUnit.equals("NativeAd")){
if(!adUnit.equals("nativeAd")){
EventUtils.event("ad_click", ext = obj)
}else{
EventUtils.event("big_imgad_click", ext = obj)
......@@ -73,8 +73,12 @@ object AdMaxEvent {
obj.put("networkplacement", ad?.networkPlacement)
obj.put("requestLatencyMillis", ad?.requestLatencyMillis)
obj.put("valueMicros", ad?.revenue)
if(!adUnit.equals("nativeAd")){
EventUtils.event("ad_show", ext = obj)
}else{
EventUtils.event("big_img_show", ext = obj)
}
}
private val taichiPref = FacebookSdk.getApplicationContext()
......
......@@ -66,6 +66,7 @@ object AdMaxInterstitialUtils {
override fun onAdDisplayed(p0: MaxAd) {
LogEx.logDebug(TAG, "onAdDisplayed")
AdDisplayUtils.getInstance().incrementAdDisplayCount()
AdMaxEvent.showAd(p0,"interAd")
}
override fun onAdHidden(p0: MaxAd) {
......
......@@ -56,7 +56,6 @@ object AdMaxNativeUtils {
AdDisplayUtils.getInstance().incrementAdClickCount()
nativeAd?.let { AdMaxEvent.clickAd(it, "nativeAd") }
AdmobCommonUtils.isMultiClick(nativeAd)
AdMaxEvent.clickAd(p0,"NativeAd")
}
override fun onNativeAdExpired(p0: MaxAd) {
......
......@@ -29,12 +29,14 @@ object AdMaxOpenUtils {
LogEx.logDebug(TAG, "onAdLoaded")
openLoadTime = System.currentTimeMillis()
loadingListener?.invoke()
AdMaxEvent.pullAd(p0,"openAd")
}
override fun onAdLoadFailed(p0: String, p1: MaxError) {
LogEx.logDebug(TAG, "onAdLoadFailed:"+p1.message.toString())
onHidden?.invoke()
AdDisplayUtils.getInstance().incrementAdRequestFailCount()
AdMaxEvent.pullAd(null,"openAd")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment