Skip to main content

Log types

The ten log types your game server sends, with every column in order. For the format of a request, the timestamp and country rules, the result codes and the deadlines, see the Log reference. For how to send, see Sending logs.

Summary​

1. Required in-game logs​

OrdLog nameDescription
1registerA new character is created.
2loginA character logs in to the game.
3logoutA character logs out of the game.
4rechargeA player pays real money and receives in-game value.
5user_snapshotCore information of every active character, taken once a day at 23:59:59 GMT+7.
6ccuNumber of concurrent users, sampled every 5 minutes.
7money_flowEvery gain and spend of in-game money, including shop purchases.
8item_flowEvery shop purchase paid with paid currency.

2. Metadata​

Given to Alogame's data team, not sent through the endpoint. See Metadata you give Alogame.

OrdNameDescription
1Schema dictionaryThe meaning of every log and column. Alogame builds it from this page.
2Recharge packagesPrice and description of each package sold in the game, in the app store or on the web store.
3In-game itemsPrice, duration and sale period of each item.
4ActionsThe meaning of each action_id used in money_flow.
5Paid currenciesWhich money_type values are bought with real money.

3. Optional logs​

OrdLog nameDescription
1missionA character takes part in a mission or activity.
2ad_revenueAdvertising revenue per app, country and day.

Realtime logs must reach Alogame within 15 minutes of the event. Every required log type also needs a full-log file of each day. See Deadlines.

Eight are required: register, login, logout, recharge, ccu, money_flow, item_flow, user_snapshot. mission and ad_revenue are optional.

register — one record per new character​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4role_classstring, ≤ 64 charsClass of the role in the game (NULL if not available).
5create_timeyyyy-MM-dd HH:mm:ss (GMT+7)Role’s registration time.
6client_ipstring, ≤ 64 charsUser’s IP.
7country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time the character is created. If you do not know it, see the rules above.
8server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
9os_platformAndroid / iOS / PC (case-insensitive)Operating system (Android/iOS/PC).
10os_versionstring, ≤ 64 charsOS version.
11device_idstring, ≤ 128 charsUser device ID.
12device_namestring, ≤ 255 charsName of the user’s device (iphone x, samsung s10, …).
  • Duplicate key: (role_id, server_id).
  • Send country_code as it was when the character was created.

login — one record per login​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of login. If you do not know it, see the rules above.
5login_timeyyyy-MM-dd HH:mm:ss (GMT+7)Login time.
6login_channelstring, ≤ 64 charsUser’s login channel.
7server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
8client_ipstring, ≤ 64 charsUser’s IP.
9os_platformstring, ≤ 16 charsOperating system (Android/iOS…).
10os_versionstring, ≤ 64 charsOS version.
11device_idstring, ≤ 128 charsUser device ID.
12device_namestring, ≤ 255 charsName of the user’s device (iphone x, samsung s10, …).
  • Duplicate key: (role_id, server_id, login_time).
  • login_channel and os_platform are ordinary columns at the positions shown. The original document renders these two rows broken (column name merged into the description); Alogame treats them as normal columns.
  • Send country_code as it was at login.

logout — one record per logout​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of logout. If you do not know it, see the rules above.
5logout_timeyyyy-MM-dd HH:mm:ss (GMT+7)Logout time.
6login_channelstring, ≤ 64 charsUser’s login channel.
7server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
8client_ipstring, ≤ 64 charsUser’s IP.
9online_timeinteger ≥ 0Online time of the login session (from the latest login to this logout), reported at logout.
10os_platformstring, ≤ 16 charsOperating system (Android/iOS…).
11os_versionstring, ≤ 64 charsOS version.
12device_idstring, ≤ 128 charsUser device ID.
13device_namestring, ≤ 255 charsName of the user’s device (iphone x, samsung s10, …).
  • Duplicate key: (role_id, server_id, logout_time).
  • online_time is in seconds, from the most recent login of the session to this logout. The original document gives no unit.

recharge — one record per completed real-money payment​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of the transaction. If you do not know it, see the rules above.
5transaction_idstring, ≤ 128 charsTransaction ID, used to identify the recharge transaction.
6money_typestring, ≤ 32 chars. The currency of the payment, for example VND; Alogame stores it in upper case, so vnd becomes VNDCurrency charged (VND, POINT, THB, …).
7product_idstring, ≤ 128 charsPayment package ID. NULL if the game does not use payment packages.
8charged_valuedecimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored)Real amount charged (in the currency above).
9ingame_valuedecimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored)In-game value received (in the in-game currency equivalent to the amount charged).
10recharge_timeyyyy-MM-dd HH:mm:ss (GMT+7)Time the transaction is made.
11server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
12payment_channelstring, ≤ 64 charsPayment platform (in-app purchase, web store).
13os_platformstring, ≤ 16 charsOperating system (Android/iOS…).
14is_first_chargeinteger, one of 0 / 1Is this the first payment? 0 = yes, 1 = no.
  • Duplicate key: transaction_id, across all days. A record with an already-stored transaction_id is counted as duplicate, not rejected; the stored record is kept, in a file as well as in a batch. This is why a correction cannot move a recharge to another day by file (details).
  • Send a recharge record only for a payment that has completed. There is no status column; failed or pending payments must not be sent.
  • transaction_id is the transaction code returned by the Alogame SDK payment flow.
  • is_first_charge is inverted: 0 = first charge, 1 = not the first charge. This matches the original document. Alogame KPIs do not use this column.
  • product_id is null if your game does not sell packages.

ccu — concurrent users, sampled​

#ColumnFormatDescription
1event_timeyyyy-MM-dd HH:mm:ss (GMT+7)Time the CCU is taken. Use the same time for all servers.
2server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
3online_usersinteger ≥ 0Number of online users of the server, for the platform in the row.
4os_platformstring, ≤ 16 charsPlatform (Android/iOS/PC) the online users are counted for.
  • Duplicate key: (event_time, server_id, os_platform).
  • One record per server_id per os_platform at every sample time, so online_users is a single number. The original document lists three columns (no os_platform) but describes online_users as "by platform"; Alogame adds os_platform as column 4.
  • Sample every 5 minutes, at minutes divisible by 5, and use the same event_time for all servers of one sample.

money_flow — every gain and spend of in-game money​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
5country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of the action (when the money is received or spent). If you do not know it, see the rules above.
6transaction_idstring, ≤ 128 charsTransaction ID used to identify the user action (for example receiving or using money).
7money_typestring, ≤ 32 charsMoney type, for example 0 = Gold, 1 = Gold Key, 2 = Silver, 3 = Glory point. NULL if the log only records the money type obtained from top-up.
8flow_typeinteger, one of 0 / 1Transaction type: 0 = receive, 1 = spend.
9action_idstring, ≤ 128 charsAction ID of the activity that gives or spends the money. Receive: login reward, daily check-in reward, reward from a support mail … Spend: store purchase, transaction fee, buying VIP, reward spin fee …
10money_valuedecimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored)Money value received or spent.
11before_valuedecimal (≤ 14 integer digits)Money value before the receive or spend action.
12after_valuedecimal (≤ 14 integer digits)Money value after the receive or spend action.
13transaction_timeyyyy-MM-dd HH:mm:ss (GMT+7)Time of the transaction.
  • Duplicate key: (transaction_id, flow_type, money_type).
  • flow_type: 0 = received, 1 = spent.
  • Include every gain and every spend of each paid currency, including item purchases in the in-game shop.
  • Send money_type as null only if the game's money_flow records nothing but the paid currency.
  • If after_value is not before_value + money_value (flow_type = 0) or before_value - money_value (flow_type = 1), the record is still stored and counted in KPIs, and counted as a BALANCE_MISMATCH anomaly.

item_flow — every shop purchase paid with paid currency​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
5country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of the action. If you do not know it, see the rules above.
6transaction_idstring, ≤ 128 charsTransaction ID used to identify the user action (for example receiving or using an item).
7money_typestring, ≤ 32 charsMoney type spent. NULL if the log only records the money type obtained from top-up.
8item_idstring, ≤ 128 charsItem ID.
9item_quantityinteger ≥ 0Item quantity. NULL if only 1 item can be bought per transaction.
10item_pricedecimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored)Item unit price.
11money_valuedecimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored)Money value spent.
12transaction_timeyyyy-MM-dd HH:mm:ss (GMT+7)Time of the transaction.
  • Duplicate key: (transaction_id, item_id).
  • Send one record per purchase from the game's built-in shop that was paid with a paid currency.
  • An empty item_quantity is stored as 1.

user_snapshot — end-of-day state of every active character​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
5country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of the snapshot. If you do not know it, see the rules above.
6money_balancedecimal (≤ 14 integer digits)Balance of each money type of the role (Gold, Silver, Diamond …). Record each money type separately.
7role_classstring, ≤ 64 charsClass of the role in the game (NULL if not available).
8role_levelintegerRole level.
9role_vip_levelintegerVIP level.
10last_login_timeyyyy-MM-dd HH:mm:ss (GMT+7)Last login time of the role.
11total_played_timeinteger ≥ 0Total played time of the role (accumulated).
12snapshot_timeyyyy-MM-dd HH:mm:ss (GMT+7)Time the snapshot information is recorded.
13money_typestring, ≤ 32 charsCurrency of money_balance. One record per money type.
  • Duplicate key: (role_id, server_id, day of snapshot_time, money_type).
  • Take the snapshot at 23:59:59 GMT+7 every day, from the character database.
  • One record per active character per money_type the character holds. The original document defines a single money_balance column and asks for each currency separately; Alogame resolves this by adding money_type as the last column.
  • An active character is one that logged in during the day.
  • total_played_time is the character's cumulative playing time in seconds.

mission — optional​

#ColumnFormatDescription
1account_idstring, ≤ 64 charsUser account (user ID).
2role_idstring, ≤ 64 charsRole ID.
3role_namestring, ≤ 255 charsRole name.
4event_datetimeyyyy-MM-dd HH:mm:ss (GMT+7)Time the role takes part in the mission.
5server_idstring, ≤ 64 charsServer ID. NULL if the log is recorded individually for each server or the game is not clustered.
6country_codeISO 3166-1 alpha-2, upper caseCountry of the player, captured at the time of the action. If you do not know it, see the rules above.
7mission_idstring, ≤ 128 charsMission ID.
8mission_namestring, ≤ 255 charsMission name.
9mission_typestring, ≤ 64 charsMission type (event, task, quest, …).
10mission_flagstring, ≤ 32 charsMission flag (enter, success, failed, …).
  • Only for games that declared mission.
  • Duplicate key: (role_id, server_id, mission_id, mission_flag, event_datetime).

ad_revenue — optional, one record per app, country and day​

#ColumnFormatDescription
1app_platformstring, ≤ 16 charsPlatform of the app/game (iOS, Android).
2app_idstring, ≤ 128 charsApp ID on the corresponding platform.
3app_namestring, ≤ 255 charsApp/game name on the corresponding platform.
4revenuedecimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored)Revenue (amount received) from advertising.
5country_codeISO 3166-1 alpha-2, upper caseCountry code of the ad viewers.
6dateyyyy-MM-ddDate the revenue was incurred.
7currency_codeISO 4217, upper caseCurrency code of the corresponding revenue.
  • Only for games that declared ad_revenue.
  • Duplicate key: (app_platform, app_id, country_code, date, currency_code). ad_revenue is the one log type where a record with an existing key replaces the stored one, in a realtime batch as well as in a file, so you can resend a corrected daily total.

Metadata you give Alogame​

Besides the logs, Alogame needs four lists that explain the ids and columns in your logs. Your game server does not send them through the Game Log endpoint. Give them to Alogame's data team before your data starts; the data team registers them in the CMS. Alogame still stores a record that points to an id not registered yet, and lists such ids for the data team.

Recharge packages​

One row per package sold. Needed when recharge.product_id is used.

FieldDescription
product_idPackage ID, the value you send in recharge.product_id.
product_namePackage name.
product_typePackage type.
payment_channelWhere the package is sold (in-app purchase, web store, in-game store).
priceReal price of the package.
currency_codeCurrency of price, ISO 4217.

Identified by (product_id, payment_channel). After a package is registered, its price and currency_code cannot be changed: register a new product_id for a new price.

In-game items​

One row per item. Needed when item_flow.item_id is used.

FieldDescription
item_idItem ID, the value you send in item_flow.item_id.
item_nameItem name.
descriptionItem description.
item_priceUnit price. It cannot be changed after the item is registered.
durationDuration of the item, in minutes.
timeNumber of times the item can be used.
effective_start_dateFirst day the item is on sale.
effective_end_dateLast day the item is on sale.

Actions​

One row per action_id used in money_flow.

FieldDescription
action_idAction ID, the value you send in money_flow.action_id.
action_nameAction name, for example "Daily check-in reward".
descriptionWhat the action does.

The list of money_type values that are bought with real money. Alogame uses it to tell paid currency from free currency in your money logs.

Schema dictionary​

The meaning of every log and column. Alogame builds it from the column tables on this page when it declares the schema of your game, so you do not provide it.