adjust上报
This commit is contained in:
parent
179deb6438
commit
9666158491
@ -209,6 +209,7 @@ local EVENT_NAME_PLAYER_LV_UP = "client_player_lv_up" -- 玩家升级
|
||||
local EVENT_NAME_PAY_UI_SHOW = "client_pay_ui_show" -- 内购相关界面展示
|
||||
local EVENT_NAME_BOUNTY_OPT = "client_bounty_opt" -- 战令事件
|
||||
local EVENT_NAME_NETWORK_OPT = "client_network_opt" -- 网络操作
|
||||
local EVENT_NAME_APPLOVIN_AD_REVENUE = "client_applovin_ad_revenue" -- applovin广告收入
|
||||
|
||||
function BIReport:setIsNewPlayer(isNewPlayer)
|
||||
self.isNewPlayer = isNewPlayer
|
||||
@ -225,6 +226,12 @@ function BIReport:postAdjustSimpleTrackEvent(eventName, eventValue)
|
||||
CS.BF.BFMain.Instance.SDKMgr.BFThirdReportSDKMgr:PostAdjustSimpleTrackEvent(eventName, json.encode(eventValue))
|
||||
end
|
||||
|
||||
function BIReport:postAdjustAdRevenueAppLovinMAX(revenue, networkName, adUnitIdentifier, placement)
|
||||
if not Platform:getIsPublishChannel() or EDITOR_MODE then
|
||||
return
|
||||
end
|
||||
CS.BF.BFMain.Instance.SDKMgr.BFThirdReportSDKMgr:PostAdjustAdRevenueAppLovinMAX(revenue, networkName, adUnitIdentifier, placement)
|
||||
end
|
||||
|
||||
function BIReport:updateAccountId(id)
|
||||
if id == nil then
|
||||
@ -347,7 +354,12 @@ function BIReport:postPurchase(price, content, originOrderId, orderId)
|
||||
CS.BF.BFMain.Instance.SDKMgr.BFLoginSDKMgr.FBSdk:LogPurchase(price, "USD", json.encode(fbArgs))
|
||||
|
||||
-- 上报付费到adjust
|
||||
CS.BF.BFMain.Instance.SDKMgr.BFThirdReportSDKMgr:PostAdjustRevenueTrackEvent("naoyh8", price, "USD")
|
||||
if Platform:isIosPlatform() then
|
||||
self:postAdjustSimpleTrackEvent("rumq9q", {})
|
||||
else
|
||||
self:postAdjustSimpleTrackEvent("xzqrsb", {})
|
||||
end
|
||||
-- CS.BF.BFMain.Instance.SDKMgr.BFThirdReportSDKMgr:PostAdjustRevenueTrackEvent("naoyh8", price, "USD")
|
||||
end
|
||||
|
||||
-- 上报等级提升事件,单独处理,只上报到AF和FB,不上报数数
|
||||
@ -945,4 +957,15 @@ function BIReport:postNetWorkOpt(optType, uiName, errorCode, disconnectTime)
|
||||
self:report(EVENT_NAME_NETWORK_OPT, args)
|
||||
end
|
||||
|
||||
function BIReport:postAppLovinAdRevenue(msg)
|
||||
local args = json.decode(msg) or {}
|
||||
if args.revenue then
|
||||
args.revenue = tonumber(args.revenue)
|
||||
end
|
||||
self:report(EVENT_NAME_APPLOVIN_AD_REVENUE, args)
|
||||
if args.revenue and args.network_name and args.ad_unit_identifier and args.placement then
|
||||
self:postAdjustAdRevenueAppLovinMAX(args.revenue, args.network_name, args.ad_unit_identifier, args.placement)
|
||||
end
|
||||
end
|
||||
|
||||
return BIReport
|
||||
@ -184,7 +184,6 @@ function PayManager:requestRewards(purchaseToken, orderId, originOrderId, produc
|
||||
if rechargeCfg then
|
||||
BIReport:postPurchase(rechargeCfg.price, rechargeCfg.payId, originOrderId, orderId)
|
||||
end
|
||||
BIReport:postAdjustSimpleTrackEvent("rumq9q", {})
|
||||
end
|
||||
|
||||
-- 支付上报
|
||||
|
||||
@ -278,6 +278,11 @@ function SDKManager:initAdsListener()
|
||||
elseif CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer then
|
||||
-- 初始化一下
|
||||
local adManager = CS.AdManager.Instance
|
||||
adManager:SetAdRevenuePaidEventCallback(function (result)
|
||||
if result and result ~= GConst.EMPTY_STRING then
|
||||
BIReport:postAppLovinAdRevenue(result)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -36,13 +36,10 @@ function ShopData:initActGift(act)
|
||||
end
|
||||
act = act or {}
|
||||
local gifts = act.gifts or {}
|
||||
-- 转为map结构
|
||||
-- 转为map结构
|
||||
for _, gift in ipairs(gifts) do
|
||||
local giftType = gift.act_type
|
||||
local giftId = gift.id
|
||||
local buyCount = gift.buy_count -- 已购次数
|
||||
local latestBuyTime = gift.latest_buy_at -- 最后一次购买时间
|
||||
local latestOrderUuid = gift.latest_order_uuid -- 正在支付的订单ID
|
||||
if not self.giftMap then
|
||||
self.giftMap = {}
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user