5. Report

5.1. Report character creation

5.1.1. Description

To enhance the efficiency of advertising delivery, it is crucial to accurately track user acquisition.

The Wakool platform should be notified when a player actually begins to play, typically when they create their character, to differentiate from users who bounce immediately.

In advertising terms, this is known as Complete Registration.

If the game-play does not involve character creation, it should be reported 30 seconds after the player enters and begins interacting with the game.

5.1.2. API to notify the platform when user really begins to play:

wakool.completeRegistration(server_id, character_id);

Parameters:

parameter name description
server_id The id of the server the user is playing (when applicable)
character_id The id of the player character (when applicable)

5.2. Report game progress

Developers report the players' game progress, such as level-up, stage cleared, or achievement unlocked to the platform by calling the API function gameProgress() with details of the specific event.

5.2.1. Description

The API allows developer to report event_id and event_data, where event_id can be one of predefined events or custom strings; optionally passed in event_data containing relevant event details or custom values.

Typically, this is called each time a player enters the game. Please avoid spamming this API.

The reporting function is executed asynchronously and return a Promise object.

5.2.2. Report game progress API

wakool.gameProgress(event_id, event_data);

5.2.3. Parameters:

name type description
event_id string Either a predefined event ID or custom string.
event_data object Details relevant to the event, optional. Should be a data object contains predefined event datas or custom values.

5.2.4. Predefined event IDs

event ID description
LEVEL_UP Player leveling up. Consider provides level in event_data.
STAGE_CLEARED Stage cleared event. Consider provides stage, score in event_data.
ACHIEVEMENT_UNLOCKED Achievement unlocked event. Consider provides achievement in event_data.
GAME_CLEARED Game cleared. Consider provides score in event_data.

5.2.5. Predefined event details

name type description
level int The current level of the player
stage string The current stage of the player
achievement string The id of the achievement that player achieved
score int The current score of the player
server_id string The current server id of the player

5.2.6. Example

wakool.gameProgress('ACHIEVEMENT_UNLOCKED', {
    level: 100,
    achievement: 'king_of_the_world',
    description: 'First player to reach level 100',
}).then(function(result){
    if(result.exit_game) {
        // about to redirect the player to collect rewards 
        // and leave the game page. Here's the last chance to 
        // save the game data.
    }
});

results matching ""

    No results matching ""