User Properties
User dimensions allow you to attach properties to events, facilitating the analysis of metrics across important user characteristics. This feature is available from Homa Belly Core 2.9 onwards.
Note
Only add specific user properties when requested by your Project Manager or Data Analyst.
Setting User Properties
Use the following method to set a user property:
Analytics.SetUserProperty("propertyName", propertyValue);
Once set, this property will be attached to all subsequent events until it is updated again.
Example
// Set the user's current coin balance
Analytics.SetUserProperty("coins", playerCoins);
Best Practices
- Set user properties as early as possible, ideally during game initialization or user login.
- Update properties whenever their values change to ensure accurate data.
- Use consistent property names across your game to maintain data integrity.
- Avoid setting too many properties to prevent data overload.
Common User Properties
While specific properties depend on your game and analysis needs, some common examples include:
- Player level
- In-game currency balances
- Highest score achieved
- Player preferences (e.g., favorite character, chosen difficulty)