抖音游戏
本栏目下的接口仅用于与抖音游戏进行深度数据合作的场景。若游戏没有与抖音游戏进行深度数据合作的需求,无需调用该接口进行自定义事件上报。
抖音自定义事件上报
上报抖音全官服促活分账 SDK 自定义事件。
提示
研发需先通过 ComboSDK.IsFeatureAvailable(Feature.REPORT_DOUYIN_CUSTOM_EVENT) 判断功能是否可用,仅在返回 true 时才可调用该接口进行事件上报。
支持平台
方法签名
public static void ReportDouyinCustomEvent(string eventName, Dictionary<string, string> eventParams);
代码示例
Show Code
if(ComboSDK.IsFeatureAvailable(Feature.REPORT_DOUYIN_CUSTOM_EVENT))
{
ComboSDK.ReportDouyinCustomEvent("active_pay_failed", new Dictionary<string, string>()
{
{"game_user_id_define", ComboSDK.GetLoginInfo().comboId},
{"game_order_id", orderId},
{"total_amount", totalAmount},
{"product_id", productId},
{"product_name", productName},
{"product_desc", desc}
});
}
方法参数
| Parameters | Required | Type | Description |
|---|---|---|---|
| eventName | True | string | 自定义事件名称 |
| eventParams | True | Dictionary<string, string> | 自定义事件的参数 |
信息
自定义事件的名称和参数,由游戏项目组和抖音游戏协商确定。