September 20, 2022


GameAnalytics:ReportData(behavior, explain, player)


In the process of game development, developers can implant code into key points of the game to record player behavior. Track player behavior through statistics, analyze player behavior, and optimize and improve the player's game experience. For example, record the purchase times of certain props, the number of people who pass each level, and the use of new functions, so as to analyze whether the props are popular, the difficulty of the level, and the acceptance of new functions, and judge whether the game needs to be adjusted through this data.


Variable name Type Describe
behavior string behavior
explain string Behavior explanation, optional
player Entity Players with behaviors

The player entity passed in by data reporting must be a player entity

The entity passed in when the client performs data reporting must be the current client player entity

Code example

It is reported when players buy props. It is used to count the number of times players buy different props and analyze which props players prefer.

---The logic for purchasing props is omitted here