Main

Quick Start Guide

Get results faster. Follow the events in this Quick Start Guide to get your metrics sooner. With these events logged you'll have the essentials in place to obtain beyond basic metrics:

Once you have these 18 fundamental events in place move on to the Advanced Setup Guide to optimize your experience and add even more value. *Set Virtual Currency (Event ID#14) *Delete Account (Event ID#10) *Initialize Shard (Event ID#13) *Subscription Change (Event ID#3) *Item Transaction (Event ID#17) *Currency Transaction (Event ID#18) *Non-Player Character (NPC) (Event ID#31) *Recruitment Send (Event ID#33) *Recruitment Receive Action (Event ID#34)


Login (Event ID#1)

This event records the time at which the user logged into the system (website, game, software, etc.). To log a login event, you need to pass the user's account ID, character ID, platform, and timestamp. Optionally, you may pass the shard ID, and login area name and ID.

Impacted UI Features

  • KPI
  • System Metrics (Items, Location/Maps, NPC, Social)
  • User Metrics (Churn, Farming, Integrity)
  • Basic Package (Summary)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longshard_id0
StringplatformOther
Longarea_idNull
Stringarea_nameNull

Sample Use

  • Java

//Log when a user logs in
public void aKApi.logLogin(timestamp, account_id, character_id, shard_id, platform, area_id, area_name);

  • JavaScript

//Log when a user logs in
aKApi.logLogin(timestamp, account_id, character_id, shard_id, platform, area_id, area_name);

  • PHP

//Log when a user logs in
$aKApi->logLogin(timestamp, account_id, character_id, shard_id, platform, area_id, area_name);

  • JSON

//Log when a user logs in

        {
                "timestamp":"2013-11-14T13:43:06.308Z",
                 "data":{
                        "type":1,
                        "account_id":"cool_guy@example.com",
                        "character_id":"Wizard",
                        "shard_id":42,
                        "platform":"Facebook Mobile",
                        "area_id":0,
                        "area_name":0
                }
        }

NOTE: All parameters are required in JSON, except “shard_id”, “area_id” and “area_name” which are optional.

Back to Top


Logout (Event ID#2)

This event records the time at which the user logged out of the system (website, game, software, etc.). To log a logout event, you need to pass the user's account ID, character ID, and timestamp.

Impacted UI Features

  • KPI
  • User Metrics (Churn, Farming, Integrity)
  • Basic Package (Summary)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id

Sample Use

  • Java

//Log when a user logs out
public void aKApi.logLogout(timestamp, account_id, character_id);

  • JavaScript

//Log when a user logs out
aKApi.logLogout(timestamp, account_id, character_id);

  • PHP

//Log when a user logs out
$aKApi->logLogout(timestamp, account_id, character_id);

  • JSON

//Log when a user logs out

        {
                "timestamp":"2013-11-14T13:51:53.035Z",
                "data":{
                        "type":2,
                        "account_id":"cool_guy@example.com",
                        "character_id":"Wizard"
                }
        }

NOTE: All parameters are required in JSON.

Back to Top


Social Group Enter (Event ID#4)

This event records the time at which a user joins a group. In this case, groups are likely to be impermanent. Note that grouping is not applicable for solo games. To log a user's entry into a group you need to pass the account, character, and group IDs; the character level, and timestamp of entry. Optionally, you may pass the shard ID.

Impacted UI Features

  • System Metrics (Social)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvl0
Longshard_id0
Longgroup_idNo Default Value

Sample Use

  • Java

//Log when a user enters a group
public void aKApi.logEnterGroup(timestamp, account_id, character_id, character_lvl, shard_id, group_id);

  • JavaScript

//Log when a user enters a group
aKApi.logEnterGroup(timestamp, account_id, character_id, character_lvl, shard_id, group_id);

  • PHP

//Log when a user enters a group
$aKApi->logEnterGroup(timestamp, account_id, character_id, character_lvl, shard_id, group_id);

  • JSON

//Log when a user enters a group

        {
                "timestamp":"2013-11-14T14:10:36.792Z",
                "data":{
                        "type":4,
                        "account_id":"cool_guy@example.com",
                        "character_id":"wizard",
                        "character_lvl":50,
                        "shard_id":42,
                        "group_id":42
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Social Group Exit (Event ID#5)

This event records the time at which a user leaves a group. To log a user's exit from a group you need to pass the account, character, and group IDs; the character level; and timestamp of exit. Optionally, you may pass the shard ID>

For related information, see Group Enter.

Impacted UI Features

  • System Metrics (Social)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvl0
Longshard_id0
Longgroup_idNo Default Value

Sample Use

  • Java

//Log when a user exits a group
public void aKApi.logExitGroup(timestamp, account_id, character_id, character_lvl, shard_id, group_id);

  • JavaScript

//Log when a user exits a group
aKApi.logExitGroup(timestamp, account_id, character_id, character_lvl, shard_id, group_id);

  • PHP

//Log when a user exits a group
$aKApi->logExitGroup(timestamp, account_id, character_id, character_lvl, shard_id, group_id);

  • JSON

//Log when a user exits a group
{

                "timestamp":"2013-11-14T14:16:15.375Z",
                "data":{
                        "type":5,
                        "account_id":"cool_guy@example.com",
                        "character_id":"Wizard",
                        "character_lvl":50,
                        "shard_id":42,
                        "group_id":42
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Social (Event ID#6)

This event records social events involving two people and includes all social events that are not covered as Group (Entry/Exit) Events or Friend (Addition/Deletion) Events. To log an in-app social event, you need to pass the sender account and character IDs; the receiver account and character IDs; the character levels of both users; the social event name and type; and the timestamp. Optionally, you may pass the shard ID.

Impacted UI Features

  • KPI
  • System Metrics (Social)
  • Basic Package (Summary)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringsender_account_idNo Default Value
Stringsender_character_idsender_account_id
Longsender_character_levelIf Generic Character then Account Level; If no concept of levels then 0.
Stringreceiver_account_idNo Default Value
Stringreceiver_character_idreceiver_account_id
Longreceiver_character_levelIf Generic Character then Account Level; If no concept of levels then 0.
Longshard_id0
Stringsocial_event_name"No Default Value''
Stringsocial_event_typeOther (See Appendix for more types)

Sample Use

  • Java

//Log an in-app social event
public void aKApi.logSocialEvent(timestamp, sender_account_id, sender_character_id, sender_character_level, receiver_account_id, receiver_character_id, receiver_character_level, shard_id, social_event_name, social_event_type);

  • JavaScript

//Log an in-app social event
aKApi.logSocialEvent(timestamp, sender_account_id, sender_character_id, sender_character_level, receiver_account_id, receiver_character_id, receiver_character_level, shard_id, social_event_name, social_event_type);

  • PHP

//Log an in-app social event
$aKApi->logSocialEvent(timestamp, sender_account_id, sender_character_id, sender_character_level, receiver_account_id, receiver_character_id, receiver_character_level, shard_id, social_event_name, social_event_type);

  • JSON

//Log an in-app social event

        {
                "timestamp":"2013-11-14T14:28:54.832Z",
                "data":{
                        "type":6,
                        "sender_account_id":"cool_guy@example.com",
                        "sender_character_id":"sharer",
                        "sender_character_level":1,
                        "receiver_account_id":"cool_guy1@example.com",
                        "receiver_character_id":"advertiser",
                        "receiver_character_level":1,
                        "shard_id":42,
                        "social_event_name":"rebate_share",
                        "social_event_type":"share"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Create Account (Event ID#9)

This event records information regarding the creation of a new account, including the user's demographics. To log the creation of an account you need to pass the account ID and type; the user's language, country, gender, and date of birth; as well as the platform and the timestamp. Optionally, you may pass their currency balance and old account ID.

Note: You must log the account creation information before any log or load command references the account ID.

Impacted UI Features

  • KPI
  • User Metrics (Churn, Farming, Integrity)
  • Basic Package (Summary)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_id"No Default Value"
Stringaccount_sub_typeFree
Stringaccount_langN0
Stringaccount_countryN0
Stringaccount_genderN
Dateaccount_dob"1900-01-01T00:00:00.000Z"
Floataccount_currency_balance0
StringplatformOther
Stringold_account_idNull

Sample Use

  • Java

//Log when a user creates an account
public void aKApi.loadAccountCreate(timestamp, account_id, account_sub_type, account_lang, account_country, account_gender, account_dob, platform, account_currency_balance, old_account_id);

  • JavaScript

//Log when a user creates an account
aKApi.loadAccountCreate(timestamp, account_id, account_sub_type, account_lang, account_country, account_gender, account_dob, platform, account_currency_balance, old_account_id);

  • PHP

//Log when a user creates an account
$aKApi->loadAccountCreate(timestamp, account_id, account_sub_type, account_lang, account_country, account_gender, account_dob, platform, account_currency_balance, old_account_id);

  • JSON

//Log when a user creates an account

       {
                "timestamp":"2013-11-14T15:18:30.726Z",
                "data":{
                        "type":9,
                        "account_id":"cool_guy@example.com",
                        "account_sub_type":"Free",
                        "account_lang":"NA",
                        "account_country":"de",
                        "account_gender":"N",
                        "account_dob":"1900-01-01T00:00:00.000Z",
                        "account_currency_balance":55,
                        "platform":"Social",
                        "old_account_id":"small_cat@example.com"
                }
        }	

NOTE: All parameters are required in JSON, except “account_currency_balance_” and “old_account_id” which are optional.

Gender accepted params: ["M", "F", "T", "N"]

Back to Top


Initialize Item (Event ID#15)

This event records information regarding virtual items in the game. Such items may be made available by non-player characters, or they may be created by players in the game. Initializing an item also initializes the dimension table for the item, which is later referred to for all other item related events. To initialize an item, you need to pass the item ID, name, type, and segment, as well as the timestamp. Optionally, you may pass the account and character IDs of the creator.

Note: You must log the item creation information before any log or load command references the item ID.

Impacted UI Features

  • KPI
  • System Metrics (Items)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Longitem_id0
Stringitem_nameNA
Stringitem_typeOther (See Appendix for more types)
Stringitem_segment"UGC or INGAME"
Stringaccount_idIf ITEM_SEGMENT=UGC, then Required.
Stringcharacter_idIf ITEM_SEGMENT=UGC, then account_id

Sample Use

  • Java

//Log item creation information
public void aKApi.loadInitItem(timestamp, item_id, item_name, item_type, item_segment, account_id, character_id);

  • JavaScript

//Log item creation information
aKApi.loadInitItem(timestamp, item_id, item_name, item_type, item_segment, account_id, character_id);

  • PHP

//Log item creation information
$aKApi->loadInitItem(timestamp, item_id, item_name, item_type, item_segment, account_id, character_id);

  • JSON

//Log item creation information

        {
		"timestamp":"2013-11-14T17:11:33.720Z",
		"data":{
		"type":15,
		"item_id":66,
		"item_name":"the big blaster gun",
		"item_type":"weapon",
		"item_segment":"UGC",
		"account_id":"cool_guy@example.com",
		"character_id":"Wizard"
		}

}

NOTE: All parameters are required in JSON, except “account_id” and “character_id” which are optional.

Back to Top


Item Used (Event ID#16)

This event records information regarding the usage of items in the game, such as the usage location, and includes account and character information for the user who used the item. To log an item's use, you need to pass the account and character IDs; the character level; the item ID, name, and count; the area ID, name, and position; as well as the timestamp. Optionally, you may pass the shard ID.

Impacted UI Features

  • KPI
  • System Metrics (Items)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvlIf Generic Character then Account Level; If no concept of levels then 0.
Longshard_id0
Longitem_idIf ITEM_ID is empty and ITEM_NAME is not empty, use 0.
Stringitem_nameIf ITEM_ID is not empty and ITEM_NAME is empty, use NA.
Integeritem_countNo Default Value
Longarea_id0
Stringarea_nameNA
Floatposition_x0
Floatposition_y0
Floatposition_z0

Sample Use

  • Java

//Log that an item was used
public void aKApi.logItem(timestamp, account_id, character_id, character_lvl, shard_id,item_id, item_name, item_count, area_id, area_name, position_x, position_y, position_z);

  • JavaScript

//Log that an item was used
aKApi.logItem(timestamp, account_id, character_id, character_lvl, shard_id,item_id, item_name, item_count, area_id, area_name, position_x, position_y, position_z);

  • PHP

//Log that an item was used
$aKApi->''logItem(timestamp, account_id, character_id, character_lvl, shard_id, item_id, item_name, item_count, area_id, area_name, position_x, position_y, position_z);

  • JSON

//Log that an item was used

        {
                "timestamp":"2013-11-14T17:42:49.185Z",
                "data":{
                        "type":16,
                        "account_id":"cool_guy@example.com",
                        "character_id":"wizard",
                        "character_lvl":52,
                        "shard_id":42,
                        "item_id":66,
                        "item_name":"The Blaster Gun",
                        "item_count":1,
                        "area_id":42,
                        "area_name":"Area_Name",
                        "position_x":678,
                        "position_y":231,
                        "position_z":517
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Message (Event ID#20)

This event records in-game messages between players for multiple channels of communication such as in-game chat, in-game mail, or a message broadcast to a group. To log an in-game message, you need to pass the sender account and character IDs; the receiver account and character IDs; the channel label; the message character count; and the timestamp. Optionally, you may pass the shard ID and the message description.

Impacted UI Features

  • System Metrics (Levels)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringsender_account_idNo Default Value
Stringsender_character_idsender_account_id
Stringreceiver_account_idNo Default Value
Stringreceiver_character_idreceiver_account_id
Longshard_id0
Stringmessage_ch_labelOther (See Appendix for more types)
Stringmessage_descNull
Longmessage_char_count1

Sample Use

  • Java

//Log an in-game message
public void aKApi.logMessage(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id, shard_id, message_ch_label, message_desc, message_char_count);

  • JavaScript

//Log an in-game message
aKApi.logMessage(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id, shard_id, message_ch_label, message_desc, message_char_count);

  • PHP

//Log an in-game message
$aKApi->logMessage(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id, shard_id, message_ch_label, message_desc, message_char_count);

  • JSON

//Log an in-game message

        {
                "timestamp":"2013-11-14T18:46:02.842Z",
                "data":{
                        "type":20,
                        "sender_account_id":"cool_guy@example.com",
                        "sender_character_id":"Wizard",
                        "receiver_account_id":"cool_guy@example.com",
                        "receiver_character_id":"Wizard",
                        "shard_id":0,
                        "message_ch_label":"Group:Pre-Defined",
                        "message_desc":"A guild chat message",
                        "message_char_count":140
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” and “message_desc” which are optional.

Back to Top


Player Points (Event ID#24)

This event records information regarding when a player gains points in the game. Points are used as an indicator of how well the player is doing in the game and how far they have progressed. Typically, gaining enough points leads the player to level-up to a higher level. To log player points, you need to pass the account and character IDs, the character level, the point amount and type, along with the timestamp. Optionally, you may pass the shard ID and whether or not the points are grouped.

Impacted UI Features

  • System Metrics (Levels)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvlIf Generic Character then Account Level; If no concept of Levels then 0.
Longshard_id0
Longpoint_typeDefault = XP, {XP, GENERIC_POINTS, OTHER}
Longxp_amountNo Default Value
Booleangrouped_flagN

*Point Type default is XP, alternate options include 'Generic Point', and 'Other'.

Sample Use

  • Java

//Log player XP
public void aKApi.playerXp(timestamp, account_id, character_id, character_lvl, shard_id, point_type, xp_amount, grouped_flag);

  • JavaScript

//Log player XP
aKApi.playerXp(timestamp, account_id, character_id, character_lvl, shard_id, point_type, xp_amount, grouped_flag);

  • PHP

//Log player XP
$aKApi->playerXp(timestamp, account_id, character_id, character_lvl, shard_id, point_type, xp_amount, grouped_flag);

  • JSON

//Log player XP

        {
                "timestamp":"2013-11-15T13:17:01.847Z",
                "data":{
                        "type":24,
                        "account_id":"cool_guy@example.com",
                        "character_id":"Wizard",
                        "character_lvl":1,
                        "shard_id":42,
                        "point_type":"XP"
                        "xp_amount":34,
                        "grouped_flag":"Y"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” and “grouped_flag” which are optional.

Back to Top


Level Begin (Event ID#27)

This event records information regarding the time at which a player begins a level. To log when a player begins a level, you need to pass the account and character ID, the character level, the area ID and name, the position, and the timestamp. Optionally, you may pass the shard ID.

Note that if there is no concept of levels in your application this event need not be used.

Impacted UI Features

  • KPI
  • System Metrics (Levels)
  • User Metrics (Churn)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvlIf Generic Character then Account Level.
Longshard_id0
Longarea_id0
Floatposition_x0
Floatposition_y0
Floatposition_z0
Stringarea_nameNA

Sample Use

  • Java

//Log when a player begins a level
public void aKApi.levelBegin(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • JavaScript

//Log when a player begins a level
aKApi.levelBegin(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • PHP

//Log when a player begins a level
$aKApi->levelBegin(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • JSON

//Log when a player begins a level

        {
                "timestamp":"2013-11-15T13:41:08.559Z",
                "data":{
                        "type":27, 
                        "account_id":"cool_guy@example.com", 
                        "character_id":"Wizard", 
                        "character_lvl":52, 
                        "shard_id":42, 
                        "area_id":2,
                        "position_x":678,
                        "position_y":231,
                        "position_z":517,
                        "area_name":"Area_Name"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Level End (Event ID#28)

This event records information regarding the time at which a player ends or completes a level. To log when a player ends a level, you need to pass the account and character ID, the character level, the area ID and name, the position, and the timestamp. Optionally, you may pass the shard ID.

Note that if there is no concept of levels in your application this event need not be used.

Impacted UI Features

  • KPI
  • System Metrics (Levels)
  • User Metrics (Churn)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvlIf Generic Character then Account Level.
Longshard_id0
Longarea_id0
Floatposition_x0
Floatposition_y0
Floatposition_z0
Stringarea_nameNA

Sample Use

  • Java

//Log when a player begins a level
public void aKApi.levelBegin(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • JavaScript

//Log when a player begins a level
aKApi.levelBegin(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • PHP

//Log when a player begins a level
$aKApi->levelBegin(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • JSON

//Log when a player ends a level

        {
                "timestamp":"2013-11-15T13:50:42.553Z",
                "data":{
                        "type":28,
                        "account_id":"cool_guy@example.com",
                        "character_id":"Wizard",
                        "character_lvl":52,
                        "shard_id":42,
                        "area_id":2,
                        "position_x":678,
                        "position_y":231,
                        "position_z":517,
                        "area_name":"Area_Name"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Enter Area (Event ID#29)

An Area refers to a geographical area or region that makes up a larger virtual world. This event records information regarding the time at which a player enters an area. To log when a player enters an area, you need to pass the account and character IDs; area ID, level, and position; and the timestamp. Optionally, you may pass the shard ID.

Impacted UI Features

  • KPI - Optional
  • System Metrics (Location/Maps)
  • User Metrics (Farming)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvl0
Longshard_id0
Longarea_idIf AREA_ID is not empty, and AREA_NAME is empty, set AREA_NAME=NA.
Floatposition_x0
Floatposition_y0
Floatposition_z0
Stringarea_nameIf AREA_ID is not empty, and AREA_NAME is empty, set AREA_NAME=NA.

Sample Use

  • Java

//Log when a player enters an area
public void aKApi.logAreaEnter(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • JavaScript

//Log when a player enters an area
aKApi.logAreaEnter(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name)

  • PHP

//Log when a player enters an area
$aKApi->logAreaEnter(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name)

  • JSON

//Log when a player enters an area

        {
                "timestamp":"2013-11-15T14:04:32.369Z",
                "data":{
                        "type":29,
                        "account_id":"cool_guy@example.com",
                        "character_id":"wizard",
                        "character_lvl":52,
                        "shard_id":42,
                        "area_id":200,
                        "position_x":678,
                        "position_y":231,
                        "position_z":517,
                        "area_name":"Area_Name"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Exit Area (Event ID#30)

This event records information regarding the time at which a player exits an area. To log when a player exits an area, you need to pass the account and character IDs; the area level, position, and ID; and the timestamp. Optionally, you may pass the shard ID.

For related information, see Enter Area.

Impacted UI Features

  • KPI - Optional
  • System Metrics (Levels, Location/Maps)
  • User Metrics (Farming)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringcharacter_idaccount_id
Longcharacter_lvl0
Longshard_id0
Longarea_idIf AREA_ID is not empty, and AREA_NAME is empty, set AREA_NAME=NA.
Floatposition_x0
Floatposition_y0
Floatposition_z0
Stringarea_nameIf AREA_ID is not empty, and AREA_NAME is empty, set AREA_NAME=NA.

Sample Use

  • Java

//Log when a player enters an area
public void aKApi.logAreaEnter(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name);

  • JavaScript

//Log when a player enters an area
aKApi.logAreaEnter(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name)

  • PHP

//Log when a player enters an area
$aKApi->logAreaEnter(timestamp, account_id, character_id, character_lvl, shard_id, area_id, position_x, position_y, position_z, area_name)

  • JSON

//Log when a player exits an area

        {
                "timestamp":"2013-11-15T14:11:05.873Z",
                "data":{
                        "type":30,
                        "account_id":"cool_guy@example.com",
                        "character_id":"wizard",
                        "character_lvl":52,
                        "shard_id":42,
                        "area_id":200,
                        "position_x":678,
                        "position_y":231,
                        "position_z":517,
                        "area_name":"Area_Name"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top


Buy Store Item (Event ID#37)

This event records information regarding item purchases from an in-game store and includes details on the type of currency used. To log when a player buys a store item, you need to pass the account, character, and store IDs; the shard ID; the recipient account and character IDs; the item ID, name, and price; the currency type and value; and the timestamp. Optionally, you may pass the name of the virtual currency and the virtual currency count.

Impacted UI Features

  • KPI
  • User Metrics (Churn)
  • Basic Package (Summary)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringsender_account_idNo Default Value
Stringsender_character_idaccount_id
Stringreceiver_account_idNo Default Value
Stringreceiver_character_idreceiver_account_id
Longshard_id0
Longstore_idNo Default Value
Longitem_idIf Item ID is empty and Item Name is not empty, use 0.
Stringitem_nameIf Item ID is not empty and Item Name is empty, use NA.
Floatitem_priceNo Default Value
Integercurrency_typeNo Default Value*
Stringvirtual_currency_labelIf Currency Type is 1 then mandatory, else NULL.
Floatcurrency_valueNo Default Value
Integervirtual_currency_countNull

*Currency Type must be 0 or 1, where 0 equals 'Real' and 1 equals 'Virtual Currency'.

Sample Use

  • Java

//Log when a player buys a store item
public void aKApi.storeBuyItem(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id, shard_id, store_id, item_id, item_name, item_price, currency_type, virtual_currency_label, currency_value, virtual_currency_count);

  • JavaScript

//Log when a player buys a store item
aKApi.storeBuyItem(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id, shard_id, store_id, item_id, item_name, item_price, currency_type, virtual_currency_label, currency_value, virtual_currency_count);

  • PHP

//Log when a player buys a store item
$aKApi->storeBuyItem(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id, shard_id, store_id, item_id,item_name, item_price, currency_type, virtual_currency_label, currency_value, virtual_currency_count);

  • JSON

//Log when a player buys a store item

        {
                "timestamp":"2013-11-15T15:18:44.377Z",
                "data":{
                        "type":37,
                        "sender_account_id":"cool_guy@example.com",
                        "sender_character_id":"Wizard",
                        "receiver_account_id":"small_cat@example.com",
                        "receiver_character_id":"Wizard",
                        "shard_id":42,
                        "store_id":1,
                        "item_id":66,
                        "item_name":"The Blaster Gun",
                        "item_price":3,
                        "currency_type":1,
                        "virtual_currency_label":"MCH",
                        "currency_value":"4",
                        "virtual_currency_count":1
                }
        }

NOTE: All parameters are required in JSON, except “shard_id”, “virtual_currency_label”, and “virtual_currency_count” which are optional.

Back to Top


Friend Addition (Event ID#43)

This event records information regarding a player adding another player as a friend, despite whether the friendship is reciprocated. To log a friend addition, you need to pass the sender account and character IDs; the receiver account and character IDs; and the timestamp.

Please note that this is a one-way, "follow" type of addition. If Bob is accepting a friend request from Alice, and they will subsequently appear on each other's friends list, then two events should be sent. One with Alice as the sender and Bob as the recipient, and another with Bob as the sender and Alice as the recipient. If Alice is simply following Bob without any action on his part, then you only need to send a single event with Alice as the sender and Bob as the recipient.

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringsender_account_idNo Default Value
Stringsender_character_idsender_account_id
Stringreceiver_account_idNo Default Value
Stringreceiver_character_idreceiver_account_id

Sample Use

  • Java

//Log a friend addition
public void aKApi.logFriendAdd(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id);

  • JavaScript

//Log a friend addition
aKApi.logFriendAdd(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id);

  • PHP

//Log a friend addition
$aKApi->logFriendAdd(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id);

  • JSON

//Log a friend addition

        {
                "timestamp":"2013-11-15T17:35:00.091Z",
                "data":{
                        "type":43,
                        "sender_account_id":"cool_guy@example.com",
                        "sender_character_id":"Wizard",
                        "receiver_account_id":"small_cat@example.com",
                        "receiver_character_id":"Wizard"
                }
        }

NOTE: All parameters are required in JSON.

Back to Top


Friend Deletion (Event ID#44)

This event records information regarding the end of an in-game friendship. To log a friend deletion, you need to pass the sender account and character IDs; the receiver account and character IDs; along with the timestamp.

For related information, see Friend Addition.

Please note that this is a one-way, "unfollow" type of deletion. If Alice and Bob are currently in each other's friends list, and a removal from one party will cause them to be dropped from both lists, then you should send two deletion events. One with Alice as the sender and Bob as the recipient, and another with Bob as the sender and Alice as the recipient.

Impacted UI Features

  • System Metrics (Levels)

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringsender_account_idNo Default Value
Stringsender_character_idsender_account_id
Stringreceiver_account_idNo Default Value
Stringreceiver_character_idreceiver_account_id

Sample Use

  • Java

//Log a friend addition
public void aKApi.logFriendAdd(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id);

  • JavaScript

//Log a friend addition
aKApi.logFriendAdd(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id);

  • PHP

//Log a friend addition
$aKApi->logFriendAdd(timestamp, sender_account_id, sender_character_id, receiver_account_id, receiver_character_id);

  • JSON

//Log a friend deletion

        {
                "timestamp":"2013-11-15T17:40:17.868Z",
                "data":{
                        "type":44,
                        "sender_account_id":"cool_guy@example.com",
                        "sender_character_id":"Wizard",
                        "receiver_account_id":"small_cat@example.com",
                        "receiver_character_id":"Wizard"
                }
        }

NOTE: “sender_account_id”, and “receiver_account_id” are required, while all other parameters are optional.

Back to Top


Traffic Source (Event ID#59)

This event records information regarding where your traffic is coming from, whether it’s from Facebook, an Email Campaign, or Direct Marketing. To log traffic source, you need to pass the account ID, traffic source, and traffic source type, along with the timestamp. Optionally, you may pass the shard ID.

Parameters

TypeParameterDefault Value
Datetimestamp(Current Time)
Stringaccount_idNo Default Value
Stringtraffic_sourcecampaign_name | sub_site | publisher_name | sub_publisher (See Appendix for more types)
Longshard_id0
Stringtraffic_source_typepublisher_name (See Appendix for more types)

|| String || TRAFFIC SOURCE || Other (See Appendix for more types) || || String || TRAFFIC SOURCE TYPE || Unknown (See Appendix for more types) || Sample Use

  • Java

//Log that a traffic source event occurred
public void aKApi.logTrafficSource(timestamp, account_id, traffic_source, shard_id, traffic_source_type) ;

  • JavaScript

//Log that a traffic source event occurred
aKApi.logTrafficSource(timestamp, account_id, traffic_source, shard_id, traffic_source_type) ;

  • PHP

//Log that a traffic source event occurred
$aKApi->logTrafficSource(timestamp, account_id, traffic_source, shard_id, traffic_source_type) ;

  • JSON

//Log that a traffic source event occurred

        {
                "timestamp":"2013-11-15T19:07:30.221Z",
                "data":{
                        "type":59,
                        "account_id":"cool_guy@example.com",
                        "traffic_source":"campaign_name | sub_site | publisher_name | sub_publisher",
                        "shard_id":0,
                        "traffic_source_type":"publisher_name"
                }
        }

NOTE: All parameters are required in JSON, except “shard_id” which is optional.

Back to Top