Version 2.x.x
Version 2.x.x has been deprecated and will no longer be supported in the future, please update to version 3.0.0 or higher as soon as possible.
The user needs to call functions at certain points in the game to send information to the data analysis server, which can then view the analyzed data at data4game.com.
Instructions for viewing detailed figures are available at https://falcon-game-studio.gitbook.io/falcon-bigdata/giai-thich-bieu-do/tong-quan
Currently, API is providing 8 functions that call statistics:
LevelLog
: game level statistic.InAppLog
: player in-app statistic.AdsLog
: player ad watch statistic.ResourceLog
: player resource get/use statistic.SessionLog
: player playtime statistic.FunnelLog
: designed to hierarchize players according to any property.PropretyLog
: Dynamic statistics of events/features/items players have unlocked, designed for players to define a dynamic graph themselves.ActionLog
: Statistics the movement between 2 player behaviors, designed to track the order and analyze user behavior.
At the same time, there are 2 logs that are performed automatically:
RetentionLog: player retention statistic.
UserTotalTimeLog: statistics of the player's total gaming time per play.
Details of the above automatic log functions can be viewed at Automatic Logs.
Note:
The parameters in the functions, if there is no separate note, then all need to enter a value other than null.
The strlen in the note (if any) is the length of the input string value.
If the player does not have internet access when playing the game, i.e. cannot send logs to the server, the SDK will automatically save and send when the network is restored, but this saving only contains a maximum of 100 messages.
If you need to change a specific statistical data field, you can refer PlayerParams.
As of version 2.2.2, we no longer remove error logs but will try to return the value to the correct format. This is done in order not to ignore any event of the player, helping to ensure the full push of the data. However, when using these versions, users must ensure the logic of LevelLog and FunnelLog themselves.
1.1. Level log
Call every time the player finishes a new level in the game.
The function structure is:
int level
: Playing level.(≥ 0)TimeSpan duration
: The time the player uses for the level.int wave
: Number of waves the player passes (before failing, or the total number of waves of the level if the player passes). (≥ 0)string difficulty
: The difficulty of the playing level("easy"
,"hard"
,"no hope"
, ...) (1 ≤ strlen ≤ 20)LevelStatus status
: The current status of the level when ending (LevelStatus.pass
,LevelStatus.fail
).
EXP:
DWHLog.Log.LevelLog(2, 103, 5, "normal", LevelStatus.pass)
DWHLog.Log.LevelLog(50, 69, 0, "hard", LevelStatus.fail)
Basic logic:
If the player has passed the level he is playing before, the log will not be sent (i.e. only log cases with levels the player has never passed).
If the player has never passed the playing level, if:
LevelStatus == pass: Send logs to the server and save the level value for future processing.
LevelStatus == fail: Send log to the server.
Note:
The log level is only sent to the server if the player has never passed the level, that is, if the player has passed level x, the log will only be sent when the level of the new log is different from x.
Some versions have the level value named maxPassedLevel, which will be fixed in later versions.
1.2. InApp log
Call after the player makes an InApp purchase in the game.
The function structure is:
string productId
: ID of the in-app package.(1 ≤ strlen ≤ 100)string currencyCode
: Which currency do players deposit through (Following ISO 4217 currency codes, means "USD" instead of "$", "dollar", "usDollar", ...)decimal price
: Pricing of the recharge package.(1 ≤ strlen ≤ 20)string transactionId.
string purchaseToken
: The token that Google Play returns after the transaction, otherwise it will be input with an empty string ("").string where
: Deposit location (Recharge in the shop / in the pop-up package at the end of the level,...)(1 ≤ strlen ≤ 200)
EXP:
DWHLog.Log.InappLog(8, "pack_gem_20usd", "USD", 30.99m,"GPA.330...528", "ffdhjgcgjamj ... CiSwg", "Level_45")
DWHLog.Log.InappLog(15, "daily_pack_1", "KRW", 8400m,"GPA.335...779", "fcdfhoogaefl ... HMtQQ", "shop")
1.3. Advertisement log
Call after the player finishes watching ads in the game.
The function structure is:
int maxPassedLevel:
The maximum level that the player has passed. (≥ 0)AdType type
: Type of ad watched (AdType.interstitial
,AdType.reward
)string adWhere
: Where to view AD (View in the shop, view in the level to revive/get rewards,...) (1 ≤ strlen ≤ 50)
or:
AdType type
: Type of ad watched (AdType.interstitial
,AdType.reward
)string adWhere
: Where to view AD (View in the shop, view in the level to revive/get rewards,...) (1 ≤ strlen ≤ 50)
EXP:
DWHLog.Log.AdsLog(15, AdType.interstitial, "Video_RandomEndgame")
DWHLog.Log.AdsLog(4, AdType.reward, "Video_Revival")
1.4. Resource log
Call every time the player receives/uses resources in the game.
The function structure is:
int maxPassedLevel
: The maximum level that the player has passed. (≥ 0)FlowType flowType
: Player gets/uses resources (FlowType.source - get, FlowType.sink - use).string itemType
: The resource supplement/consumption (in general) (1 ≤ strlen ≤ 50)string itemId
: The resource supplement/consumption (in specific) (1 ≤ strlen ≤ 50)string currency
: Type of resources players get (gem, gold, crystal, ...) (1 ≤ strlen ≤ 20)long amount
: The amount of resources the player receives(≥ 0)
or:
FlowType flowType
: Player gets/uses resources (FlowType.source - get, FlowType.sink - use).string itemType
: The resource supplement/consumption (in general) (1 ≤ strlen ≤ 50)string itemId
: The resource supplement/consumption (in specific) (1 ≤ strlen ≤ 50)string currency
: Type of resources players get (gem, gold, crystal, ...) (1 ≤ strlen ≤ 20)long amount
: The amount of resources the player receives(≥ 0)
EXP:
DWHLog.Log.ResourceLog(13, FlowType.source, "login", "login","gem", 2)
DWHLog.Log.ResourceLog(5, FlowType.sink, "upgrade", "upgrade_weapon","gold", 4185)
Note: itemId can be thought of as subType for itemType, a more detailed annotation for the resource (for example, for the same upgrade in itemType, but itemId will be more detailed such as upgradeWeapon / upgradeCharacter / ...), for convenient analysis charting.
1.5. Session log
Calling each end measures the amount of time the player spends on a feature (event, ...)
The function structure is:
int maxPassedLevel
: The maximum level that the player has passed. (≥ 0)TimeSpan sessionTime
: Total time the player uses for the feature (5 secs ≤ sessionTime ≤ 2 days)string gameMod
: Feature name.(1 ≤ strlen ≤ 100)
or:
TimeSpan sesionTime
: Total time the player uses for the feature (5 secs ≤ sessionTime ≤ 2 days)string gameMod
: Feature name.(1 ≤ strlen ≤ 100)
EXP:
DWHLog.Log.SessionLog(10, 1864, "event_christmas_day1_2021")
DWHLog.Log.SessionLog(4063, "daily_gameplay")
1.6. FunnelLog
It is a log used to draw a funnel chart, which creates blocking levels and filters players showing the percentage of players who passed each level.
The function structure is:
int maxPassedLevel
: The maximum level that the player has passed. (≥ 0)string funnelName
: The name of the funnel chart (1 ≤ strlen ≤ 200)string action
: Name of the level in the funnel (1 ≤ strlen ≤ 200)int priority
: The order of the level in the funnel (count from 0)
or:
string funnelName
: The name of the funnel chart (1 ≤ strlen ≤ 200)string action
: Name of the level in the funnel (1 ≤ strlen ≤ 200)int priority
: The order of the level in the funnel (count from 0)
EXP:
DWHLog.Log.
DwhFunnelLog(20, "inapp_purchase", "whale", 17)
DWHLog.Log.
DwhFunnelLog(5, "story_line", "chapter_7", 53)
Basic logic:
If the priority is greater than 0, and there has never been a log of the priority before with the same funnelName (like the priority is logged as 5 with funnelName as "level" but the system recognizes that it has never logged with priority 4 with funnelName as "level") -> log in the wrong order -> does not send logs -> the log sending needs to be done in the correct order of priority 0 -> 1 -> 2 -> 3 -> ...
If the system recognizes the previous current log priority with the same funnelName (currently log funnelName is "level", priority is 4 but in the past also logged funnelName is "level", priority is 4), then the current log will be evaluated as duplicate and not submitted.
Note: According to the nature of the funnel chart, players must pass each block level in ascending order, so the player's log must also be done in turn, the log will not be sent if the log is in the wrong order, for example, if the player has logged the funnel "play_date" with priorities 0 -> 1 -> 2 -> 3 (ie currently at level 3), then the player will have to log the funnel "play_date" at priority 4, not at other levels such as 5, 9, 2, ...
1.7. Property log
Call every time the player unlocks 1 feature, item, event,... This is a log designed to help users dynamically define the value they want to synthesize.
The function structure is:
int maxPassedLevel
: The maximum level that the player has passed. (≥ 0)string name
: Name of the type of feature/item unlocked (1 ≤ strlen ≤ 50)string value
: Type of Feature/Item unlocked (1 ≤ strlen ≤ 50)int priority
: Hierarchy, the order of the property, is used by the server to sort and chart. (≥ 0)
or:
string name
: Name of the type of feature/item unlocked (1 ≤ strlen ≤ 50)string value
: Type of Feature/Item unlocked (1 ≤ strlen ≤ 50)int priority
: Hierarchy, the order of the property, is used by the server to sort and chart. (≥ 0)
EXP:
DWHLog.Log.PropertyLog(99, "weapon", "holy_moly_whack_a_moley_legendary_cannon", 99999)
DWHLog.Log.PropertyLog(69, "level", "super_secret_hidden_level",5)
DWHLog.Log.PropertyLog(96, "mission", "extremly_difficult_mission_that_nobody_can_complete",18)
1.8. Action log
We are testing this log more closely, so in the process, the call of this log may be different on the doc.
Call when the player has just switched between two actions/events/scene/panel/etc. This is a type of log designed to track the order and analyze user behavior.
The function structure is:
string from
: previous actions of the player.(1 ≤ strlen ≤ 50)string to
: The player's current actions.(1 ≤ strlen ≤ 50)TimeSpan
time
: The time the player spends on the previous action before switching.int priority
: Hierarchy, order of action (for the server to analyze and chart).
EXP:
DWHLog.Log.ActionLog("shop", "homescene", 965, 12)
DWHLog.Log.ActionLog("weapon_upgrade_scene", "play_level", 30, 1)
DWHLog.Log.ActionLog("minigame_select_panel", "đạp_zịt_game",985, 5)
Last updated