搜索结果
返回
最后更新时间: 2021-02-04 03:12:47 PM
The statistics module is an internal integration module and it is used for data statistics reporting of SuperSDK. The module also provides an external interface to the accessor. The accessor can use the external interface to perform custom statistics reporting.
The game developer needs to communicate with SuperSDK colleagues first.
Interface description: Obtain the device information required for reporting data. It is only used for statistical reporting. The game can also obtain device information by itself. This interface is not mandatory. Interface invoke:
NSString *deviceInfo = [SuperSDK invokeString:BCORE_MODULE_STATS funcName:BCORE_FUNC_GET_DEVICE_INFO parameters:nil];
NSLog(@"获取该设备的信息为:%@", deviceInfo);
Log printing:
2018-06-04 15:59:59.350623+0800 Demo_Mubao[21114:3785861] 获取该设备的信息为:{"language":"zh-Hans-CN","factory":"Apple","net_operator":"other","is_notify":"0","device_id":"0_743b862fad741938cf57a4520c6c1a45876722b0_4270A3F2-8295-4C4C-8760-55701E49EFAA","device_name":"jiaolong的 iPhone","resolution":"640*1136","version":"4.0.0","os":"iOS11.2.6","is_vpn":"0","package_name":"com.uuzu.zctx","net_type":"WIFI","phone_number":"-1","jailbreak":"0","idfv":"45657E93-EB95-45F1-8665-75C6A83CF60D","available_disk_size":"16438476800","available_mem_size":"660471808","model":"iPhone9,1","total_disk_size":"31989469184","device_cookie":"tKzYrJJo","total_mem_size":"2095054848","new_device_id":"4270A3F2-8295-4C4C-8760-55701E49EFAA","battery_remain":"1"}
Interface description: Use the statistics report function to report the information recorded by the game to the statistics module; It should be noted that the event lable must be assigned by SuperSDK, otherwise the report is invalid.
Interface invoke:
NSDictionary *parameters = @{
@"event_id":@"Test", //事件ID,必传。
@"event_label":@"SuperSDK_ClientReport", //事件类型,必传。
@"desc":@"Test1", //事件描述。
@"stack":@"stack", //事件码。
@"extra": @{
@"eventname":@"clientreport", //事件名称,必传。
@"account":@"xingchen123456", //账号,必传。
@"server_id":@"001", //服务器ID,必传。
@"channel_id":@"2345", //CPS分包ID,手游需填,必传。
@"opid":@"2150", //运营商ID,int,必传。
@"opgameid":@"1234567890", //混服组ID,int,必传。
@"role_id":@"006510_1001", //游戏角色ID,必传。
@"role_name":@"测试用户", //游戏角色名,必传。
@"level":@"100", //游戏角色等级,int,必传。
@"vip_level":@"13", //角色Vip等级,int。
@"role_register_time":@"1542211200", //角色注册时间,10位Unix时间戳(秒),例如,1542211200。
@"role_power":@"9999", //角色战力。
@"role_union_id":@"8888", //公会ID。
@"role_paid":@"0", //是否付费用户,int,1是,0否。
@"role_type":@"role_type", //角色类型,标识角色的分类属性,1:正常 2:测试(不计入充值等统计) 3:GM/福利号 4:机器人 5:其它。
@"ad_user":@"ad_user", //广告标签, 1:广告用户,2:非广告用户,默认为2。填数字,例如, '1',代表广告用户。
@"extra_event_id":@"extra_event_id", //事件id,根据事件类型,角色id,发生时间地点等来产生该 id。例如两个人对战,处于同一事件,共用一个事件ID;用两种资源一起兑换一个道具,两条消耗日志,使用同一个事件ID。
@"loading_step":@"loading", //加载步骤。
@"is_key_loading_step":@"0", //是否必经步骤,1是,0否。
@"client_ip":@"0.0.0.0", //客户端IP。
@"account_register_time":@"1542211200", //平台账号在平台首次注册的时间,10位Unix时间戳(秒),例如,1479960346。
@"account_first_ingame_time":@"1542211200", //平台账号在该游戏首次注册时间(所有游戏服里,第一个角色的注册时间),从平台接口获取,10位Unix时间戳(秒),例如,1479960346。
@"server_type":@"server_type", //服务器类型,1:正式服,2:非正式服(包含各类测试服)。填数字,例如,'2',代表正式服。 注意:在各类常规报表中,测试服数据不会被统计在内。
@"extra_1":@"extra_1", //扩展字段。
@"extra_2":@"extra_2", //扩展字段。
@"extra_3":@"extra_3", //扩展字段。
@"extra_4":@"extra_4", //扩展字段。
@"extra_5":@"extra_5" //扩展字段。
}
};
[SuperSDK invoke:BCORE_MODULE_STATS funcName:BCORE_FUNC_REPORT_DATA parameters:parameters];
备注:必传字段需传入相应的值,特殊类型如int需传入数字类型的字符串,其它未注明必传的参数传字符串即可。
Constant String | Actual String | Description |
---|---|---|
BCORE_MODULE_STATS | stats | Module name |
BCORE_FUNC_REPORT | report | Data report method name |
BCORE_FUNC_REPORT_DATA | reportCustomData | Data report method name |