Skip to main content

上报登录事件步骤(ReportLoginStep)(已过期,不建议使用)

AndroidiOSWindows
如果您使用的是 Unity 引擎,请参见 Unity SDK 的 ReportLoginStep

报告登录事件的数据以计算漏斗分析的转换率。

登录漏斗模型包含步骤:
0:启动游戏 > 1:初始化 > 2:检查更新 > 3:下载更新 > 4:解压文件 > 5:登录渠道 > 6:点击进入游戏 > 7:进入大厅

图片:登录事件

函数定义

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool ReportLoginStep(int32 step, const FString StepName, bool Result,
int32 ErrorCode, const TMap<FString, FString> ParamsMap);

入参说明

参数类型说明
Stepint32步骤 ID
从 0 开始计数
StepNameFString步骤名
Resultbool步骤结果
true:成功
false:失败
ErrorCodeint错误码
当 result=true 时,errorCode=0
当 result=false 时,errorCode 为自定义的错误码
ParamsMapTMap<FString, FString>额外的参数
JSON 格式

代码示例

TMap<FString, FString> map;
UINTLSDKAPI::ReportLoginStep(0, "start game", true, 0, map); //0、启动游戏
UINTLSDKAPI::ReportLoginStep(1, "initialize", true, 0, map); //1、初始化
UINTLSDKAPI::ReportLoginStep(2, "check for updates", true, 0, map); //2、检查更新
UINTLSDKAPI::ReportLoginStep(3, "download updates", true, 0, map); //3、下载更新
UINTLSDKAPI::ReportLoginStep(4, "unzip files", true, 0, map); //4、解压文件
UINTLSDKAPI::ReportLoginStep(5, "login channel", true, 0, map); //5、登录渠道
UINTLSDKAPI::ReportLoginStep(6, "click into game", true, 0, map); //6、点击进入游戏
UINTLSDKAPI::ReportLoginStep(7, "enter game hall", true, 0, map); //7、进入大厅