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
| Ord | Log name | Description |
|---|
| 1 | register | A new character is created. |
| 2 | login | A character logs in to the game. |
| 3 | logout | A character logs out of the game. |
| 4 | recharge | A player pays real money and receives in-game value. |
| 5 | user_snapshot | Core information of every active character, taken once a day at 23:59:59 GMT+7. |
| 6 | ccu | Number of concurrent users, sampled every 5 minutes. |
| 7 | money_flow | Every gain and spend of in-game money, including shop purchases. |
| 8 | item_flow | Every shop purchase paid with paid currency. |
Given to Alogame's data team, not sent through the endpoint. See Metadata you give Alogame.
| Ord | Name | Description |
|---|
| 1 | Schema dictionary | The meaning of every log and column. Alogame builds it from this page. |
| 2 | Recharge packages | Price and description of each package sold in the game, in the app store or on the web store. |
| 3 | In-game items | Price, duration and sale period of each item. |
| 4 | Actions | The meaning of each action_id used in money_flow. |
| 5 | Paid currencies | Which money_type values are bought with real money. |
3. Optional logs
| Ord | Log name | Description |
|---|
| 1 | mission | A character takes part in a mission or activity. |
| 2 | ad_revenue | Advertising 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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | role_class | string, ≤ 64 chars | Class of the role in the game (NULL if not available). |
| 5 | create_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Role’s registration time. |
| 6 | client_ip | string, ≤ 64 chars | User’s IP. |
| 7 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time the character is created. If you do not know it, see the rules above. |
| 8 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 9 | os_platform | Android / iOS / PC (case-insensitive) | Operating system (Android/iOS/PC). |
| 10 | os_version | string, ≤ 64 chars | OS version. |
| 11 | device_id | string, ≤ 128 chars | User device ID. |
| 12 | device_name | string, ≤ 255 chars | Name 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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time of login. If you do not know it, see the rules above. |
| 5 | login_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Login time. |
| 6 | login_channel | string, ≤ 64 chars | User’s login channel. |
| 7 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 8 | client_ip | string, ≤ 64 chars | User’s IP. |
| 9 | os_platform | string, ≤ 16 chars | Operating system (Android/iOS…). |
| 10 | os_version | string, ≤ 64 chars | OS version. |
| 11 | device_id | string, ≤ 128 chars | User device ID. |
| 12 | device_name | string, ≤ 255 chars | Name 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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time of logout. If you do not know it, see the rules above. |
| 5 | logout_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Logout time. |
| 6 | login_channel | string, ≤ 64 chars | User’s login channel. |
| 7 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 8 | client_ip | string, ≤ 64 chars | User’s IP. |
| 9 | online_time | integer ≥ 0 | Online time of the login session (from the latest login to this logout), reported at logout. |
| 10 | os_platform | string, ≤ 16 chars | Operating system (Android/iOS…). |
| 11 | os_version | string, ≤ 64 chars | OS version. |
| 12 | device_id | string, ≤ 128 chars | User device ID. |
| 13 | device_name | string, ≤ 255 chars | Name 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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time of the transaction. If you do not know it, see the rules above. |
| 5 | transaction_id | string, ≤ 128 chars | Transaction ID, used to identify the recharge transaction. |
| 6 | money_type | string, ≤ 32 chars. The currency of the payment, for example VND; Alogame stores it in upper case, so vnd becomes VND | Currency charged (VND, POINT, THB, …). |
| 7 | product_id | string, ≤ 128 chars | Payment package ID. NULL if the game does not use payment packages. |
| 8 | charged_value | decimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored) | Real amount charged (in the currency above). |
| 9 | ingame_value | decimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored) | In-game value received (in the in-game currency equivalent to the amount charged). |
| 10 | recharge_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Time the transaction is made. |
| 11 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 12 | payment_channel | string, ≤ 64 chars | Payment platform (in-app purchase, web store). |
| 13 | os_platform | string, ≤ 16 chars | Operating system (Android/iOS…). |
| 14 | is_first_charge | integer, one of 0 / 1 | Is 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
| # | Column | Format | Description |
|---|
| 1 | event_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Time the CCU is taken. Use the same time for all servers. |
| 2 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 3 | online_users | integer ≥ 0 | Number of online users of the server, for the platform in the row. |
| 4 | os_platform | string, ≤ 16 chars | Platform (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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 5 | country_code | ISO 3166-1 alpha-2, upper case | Country 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. |
| 6 | transaction_id | string, ≤ 128 chars | Transaction ID used to identify the user action (for example receiving or using money). |
| 7 | money_type | string, ≤ 32 chars | Money 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. |
| 8 | flow_type | integer, one of 0 / 1 | Transaction type: 0 = receive, 1 = spend. |
| 9 | action_id | string, ≤ 128 chars | Action 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 … |
| 10 | money_value | decimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored) | Money value received or spent. |
| 11 | before_value | decimal (≤ 14 integer digits) | Money value before the receive or spend action. |
| 12 | after_value | decimal (≤ 14 integer digits) | Money value after the receive or spend action. |
| 13 | transaction_time | yyyy-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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 5 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time of the action. If you do not know it, see the rules above. |
| 6 | transaction_id | string, ≤ 128 chars | Transaction ID used to identify the user action (for example receiving or using an item). |
| 7 | money_type | string, ≤ 32 chars | Money type spent. NULL if the log only records the money type obtained from top-up. |
| 8 | item_id | string, ≤ 128 chars | Item ID. |
| 9 | item_quantity | integer ≥ 0 | Item quantity. NULL if only 1 item can be bought per transaction. |
| 10 | item_price | decimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored) | Item unit price. |
| 11 | money_value | decimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored) | Money value spent. |
| 12 | transaction_time | yyyy-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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 5 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time of the snapshot. If you do not know it, see the rules above. |
| 6 | money_balance | decimal (≤ 14 integer digits) | Balance of each money type of the role (Gold, Silver, Diamond …). Record each money type separately. |
| 7 | role_class | string, ≤ 64 chars | Class of the role in the game (NULL if not available). |
| 8 | role_level | integer | Role level. |
| 9 | role_vip_level | integer | VIP level. |
| 10 | last_login_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Last login time of the role. |
| 11 | total_played_time | integer ≥ 0 | Total played time of the role (accumulated). |
| 12 | snapshot_time | yyyy-MM-dd HH:mm:ss (GMT+7) | Time the snapshot information is recorded. |
| 13 | money_type | string, ≤ 32 chars | Currency 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
| # | Column | Format | Description |
|---|
| 1 | account_id | string, ≤ 64 chars | User account (user ID). |
| 2 | role_id | string, ≤ 64 chars | Role ID. |
| 3 | role_name | string, ≤ 255 chars | Role name. |
| 4 | event_datetime | yyyy-MM-dd HH:mm:ss (GMT+7) | Time the role takes part in the mission. |
| 5 | server_id | string, ≤ 64 chars | Server ID. NULL if the log is recorded individually for each server or the game is not clustered. |
| 6 | country_code | ISO 3166-1 alpha-2, upper case | Country of the player, captured at the time of the action. If you do not know it, see the rules above. |
| 7 | mission_id | string, ≤ 128 chars | Mission ID. |
| 8 | mission_name | string, ≤ 255 chars | Mission name. |
| 9 | mission_type | string, ≤ 64 chars | Mission type (event, task, quest, …). |
| 10 | mission_flag | string, ≤ 32 chars | Mission 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
| # | Column | Format | Description |
|---|
| 1 | app_platform | string, ≤ 16 chars | Platform of the app/game (iOS, Android). |
| 2 | app_id | string, ≤ 128 chars | App ID on the corresponding platform. |
| 3 | app_name | string, ≤ 255 chars | App/game name on the corresponding platform. |
| 4 | revenue | decimal ≥ 0 (≤ 14 integer digits, 4 fraction digits stored) | Revenue (amount received) from advertising. |
| 5 | country_code | ISO 3166-1 alpha-2, upper case | Country code of the ad viewers. |
| 6 | date | yyyy-MM-dd | Date the revenue was incurred. |
| 7 | currency_code | ISO 4217, upper case | Currency 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.
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.
| Field | Description |
|---|
product_id | Package ID, the value you send in recharge.product_id. |
product_name | Package name. |
product_type | Package type. |
payment_channel | Where the package is sold (in-app purchase, web store, in-game store). |
price | Real price of the package. |
currency_code | Currency 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.
| Field | Description |
|---|
item_id | Item ID, the value you send in item_flow.item_id. |
item_name | Item name. |
description | Item description. |
item_price | Unit price. It cannot be changed after the item is registered. |
duration | Duration of the item, in minutes. |
time | Number of times the item can be used. |
effective_start_date | First day the item is on sale. |
effective_end_date | Last day the item is on sale. |
Actions
One row per action_id used in money_flow.
| Field | Description |
|---|
action_id | Action ID, the value you send in money_flow.action_id. |
action_name | Action name, for example "Daily check-in reward". |
description | What the action does. |
Paid currencies
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.