SDK
Hive SDK client type¶
Hive SDK enables to directly send the log formatted that client requires to the log collecting server.
Sending Funnel log on entry section of game¶
From game implementation to access to game lobby, Hive SDK sends logs by section to Analytics in order to analyze the point where users leave games.
Note
Hive SDK v4.11.0 and later supports log transmission automatically. To implement this function, create a funnel in Hive Console > Analytics > Analysis > Funnel Analysis menu. Refer to Operation > Analytics > Funnel Analysis page to create funnels on Hive Console.
- Sections to collect funnels Logs the history of a game user leaving the section below in the game app. The funnel log is recorded once for each user for a single launch of an app. Based on the Implementing Hive SDK on Game > Guide for Implementing Hive SDK on Game, you can check whether a user is leaving or not in the sections specified below.
Entrance Section | Description |
---|---|
400 | the app installation |
401 | the starting point of the Hive SDK initialization |
420 | Update/Notice |
430 | Terms of service agreement |
500 | game server manual selection |
600 | game server maintenance popup |
700 | the start of downloading game data and resources (different from game installation/update) |
800 | the end of downloading game data and resources |
900 | login |
1000 | interstitial banner |
- Send the logs of game data and resource download section It is difficult to accurately check the start and the end of the game data and resource download in the Hive SDK, so it is necessary to specify the start and the end in the game side and send the logs by yourself. Use the Hive SDK to send the logs of the start and the end of the game data and resource downloads. The Hive SDK sample code is as follows:
// 700 at the start of downloading game resources and data
Analytics.sendUserEntryFunnelsLogs("700", null);
// 800 when resource and data download complete
Analytics.sendUserEntryFunnelsLogs("800", null);
// When using Analytics.sendAnalyticsLog()
JSONObject logData = new JSONObject();
// 700 at the start of game resource and data download
logData.AddField("category", "hive_user_entry_log");
logData.AddField("sectionId", 700);
Analytics.sendAnalyticsLog(logData);;
``` cpp // 700 at the start of downloading game resources and data Analytics::sendUserEntryFunnelsLogs("700", nullptr); // 800 at the end of downloading game resources and data Analytics::sendUserEntryFunnelsLogs("800", nullptr);
<<<<<<< HEAD
=======
8d36303 // When using Analytics::sendAnalyticsLog() picojson::object logData; // 700 at the start of game resource and data download logData["category"] = picojson::value("hive_user_entry_log"); logData["sectionId"] = picojson::value((double)700); Analytics::sendAnalyticsLog(logData); ```
// 700 at the start of downloading game resources and data
Analytics.sendUserEntryFunnelsLogs("700", null);
// 800 at the end of downloading game resources and data
Analytics.sendUserEntryFunnelsLogs("800", null);
// When using Analytics.sendAnalyticsLog()
Map<String, Object> logData = new HashMap<String, Object>();
// 700 at the start of game resource and data download
logData.put("category", "hive_user_entry_log");
logData.put("sectionId", 700);
Analytics.sendAnalyticsLog(logData);
// 700 at the start of downloading game resources and data
[HIVEAnalytics sendUserEntryFunnelsLogs:@"700" withOptions:nil];
// 800 at the end of downloading game resources and data
[HIVEAnalytics sendUserEntryFunnelsLogs:@"800" withOptions:nil];
// When using HIVEAnalytics sendAnalyticsLog
NSMutableDictionary* logData = [[NSMutableDictionary alloc] init];
// 700 at the start of game resource and data download
[logData setObject:@"hive_user_entry_log" forKey:@"category"];
[logData setObject:700 forKey:@"sectionId"];
[HIVEAnalytics sendAnalyticsLog:logData];