supersdk

文档中心

文档中心

下载文档

Statistics Module


The statistics module is used to customize event reporting.

Statistics Reporting

Interface description:Call within game’s buried point, and report all information in game records to the statistics module.

Note 1: The event_label must have a fixed value SuperSDK_ClientReport, otherwise the report is invalid! Contact technical personnel to verify data is correct after access is complete.

Note 2: Must transmit fields must pass corresponding values, for a special type such as int, a numeric string is required. For other must transmite parameters that are not indicated, use a string.

Interface Call:


NSDictionary *parameters = @{
								@"event_id":@"Test",                                          //Event ID,must transmit.
								@"event_label":@"SuperSDK_ClientReport",                      //Event type,must transmit.(Note: fixed value! Cannot be modified!)
								@"desc":@"Test1",                                             //Event description.
								@"stack":@"stack",                                            //Event code.
								@"extra": @{
												@"eventname":@"clientreport",                 //Event name, must transmit.(Note: fixed value! Cannot be modified!)
												@"account":@"xingchen123456",                 //Account name, must transmit.
												@"server_id":@"001",                          //Server ID, must transmit.
												@"channel_id":@"2345",                        //CPS Package ID, required for mobile game, must transmit.
												@"opid":@"2150",                              //Operator ID,int, must transmit.
												@"opgameid":@"1234567890",                    //Server cluster ID,int, must transmit.
												@"role_id":@"006510_1001",                    //Game character ID, must transmit.
												@"role_name":@"Test User",                    //Game character name, must transmit.
												@"level":@"100",                              //Game character level, int, must transmit.
												@"vip_level":@"13",                           //Character VIP level, int.
												@"role_register_time":@"1542211200",          //Character registration time, 10 digit Unix timestamp (seconds), such as: 1542211200.
												@"role_power":@"9999",                        //Character battle rating.
												@"role_union_id":@"8888",                     //Guild ID.
												@"role_paid":@"0",                            //Paying customer,int,1 Yes, 0 No.
												@"role_type":@"role_type",                    //Character type, identifies the classification attributes of character, 1: Normal 2: Test (not included in recharge statistics) 3: GM/Benefits account 4: Bot 5: Other.   
												@"ad_user":@"ad_user",                        //Ad label: 1: Ad user (click throughs), 2: Non-Ad user, the default value is 2. Fill in a number, for example, '1', to represent an Ad user.        
												@"extra_event_id":@"extra_event_id",          //Event ID, the ID is generated based on the event type, character ID, time and place of occurrence, etc. For example, two people in the same event will share the same event ID; Exchanging two resources for one item, results in two spenditure events logged, with the same event ID.
												@"loading_step":@"loading",                   //Loading step.
												@"is_key_loading_step":@"0",                  //Key loading step, 1 Yes, 0 No.
												@"client_ip":@"0.0.0.0",                      //Client IP.
												@"account_register_time":@"1542211200",       //Account's first registration time on the platform, 10 digit Unix timestamp (seconds), such as: 1479960346.
												@"account_first_ingame_time":@"1542211200",   //Account's first registration time on the game (registration time of the first character on all game servers), get from platform interface, 10 digit Unix timestamp (seconds), such as: 1479960346.
												@"server_type":@"server_type",                //Server type, 1: Official server, 2: Unofficial server (including various test servers). Fill in a number, for example, '2', for official server. Note: Test server data will not be counted in regular report statistics.
												@"extra_1":@"extra_1",                        //Extend field.
												@"extra_2":@"extra_2",                        //Extend field.
												@"extra_3":@"extra_3",                        //Extend field.
												@"extra_4":@"extra_4",                        //Extend field.
												@"extra_5":@"extra_5",                        //Extend field.
												@"extra_6":@"extra_6",                        //Extend field.
												@"extra_7":@"extra_7",                        //Extend field.
												@"extra_8":@"extra_8",                        //Extend field.
												@"extra_9":@"extra_9",                        //Extend field.
												@"extra_10":@"extra_10"                       //Extend field.
										  }
							};

[SuperSDK invoke:BCORE_MODULE_STATS funcName:BCORE_FUNC_REPORT_DATA parameters:parameters];

Get Device Info (Optional)

Interface description:Get device information required for reporting data.

Interface Call:

NSString *deviceInfo = [SuperSDK invokeString:BCORE_MODULE_STATS funcName:BCORE_FUNC_GET_DEVICE_INFO parameters:nil];
NSLog(@"Obtained device info:%@", deviceInfo);

Log print:

2018-06-04 15:59:59.350623+0800 Demo_Mubao[21114:3785861] Received device info:
{
    "language":"zh-Hans-CN", 																	   // Language
    "factory":"Apple", 																			   // Device Manufacturer
    "net_operator":"other", 																	   // Network Carrier
    "is_notify":"0", 																			   // Push Notifications, 1 On, 0 Off
    "device_id":"0_743b862fad741938cf57a4520c6c1a45876722b0_4270A3F2-8295-4C4C-8760-55701E49EFAA", // Device ID
    "device_name":"jiaolong的 iPhone", 															   // Device Name
    "resolution":"640*1136", 																	   // Resolution
    "version":"4.0.0", 																			   // App Version
    "os":"iOS11.2.6", 																			   // Operating System
    "is_vpn":"0", 																				   // VPN, 1 On, 0 Off
    "package_name":"com.uuzu.zctx", 															   // Package Name
    "net_type":"WIFI", 																			   // Network Type
    "phone_number":"-1", 																		   // Mobile Number
    "jailbreak":"0", 																			   // Jailbroken, 1 Yes, 0 No
    "idfv":"45657E93-EB95-45F1-8665-75C6A83CF60D", 												   // App Developer ID
    "available_disk_size":"16438476800", 														   // Remaining disk space
    "available_mem_size":"660471808", 															   // Remaining memory
    "model":"iPhone9,1", 																		   // Device Model
    "total_disk_size":"31989469184", 															   // Total disk capacity
    "device_cookie":"tKzYrJJo", 																   // Device cookie
    "total_mem_size":"2095054848", 																   // Total memory
    "new_device_id":"4270A3F2-8295-4C4C-8760-55701E49EFAA", 									   // New Device ID, idfa or idfv
    "battery_remain":"1" 																		   // Remaining battery
}

List of Auxiliary Constants

String Constant Actual String Description
BCORE_MODULE_STATS stats Statistics Module Name
BCORE_FUNC_REPORT_DATA reportCustomData Statistics Reporting Method Name
BCORE_FUNC_GET_DEVICE_INFO getDeviceInfo Get Device Info Method Name