Stats - Overview

Store pieces of data about your players [PROF-Stats-01]

The Stats Feature allows game makers to: Track a variety of built-in and custom player (and guild) stat variables with configurable visibility levels (i.e. visible to everyone, visible to the player, visible to the developer only, etc...).

Use Cases

  • Data Store - A simple place to read/write info (Ex. How many characters does the player own?)
  • Targeting - Stats are the vector for player segmentation (Ex. A/B testing, targeted offer, focused message campaign, announcement for subset of player-base)

📘

Best Practices

These hints make efficent use of concepts and workflows. The Stats feature offers two main entry points;

StatsBehaviour - This has high ease-of-use. See Stats - Guide for more info
StatsService - This has high flexibility. See Stats - Code for more info

Types of Stats

1. Custom Stats

Beamable allows game makers to create custom status for the specific needs of the game design.

Supported Data Types

  • String - For common alphanumeric data storage
  • Numeric - Supports numeric evaluations on the back-end (<, >, =) and a fast, atomic increment API

Public vs Private

  • Public Stat - Visible to owning player and others (Ex. Player Alias, Player Avatar)
  • Private Stat - Visible only to the owning player (Ex. "How many characters do I have?")

📘

Best Practice

These hints make efficent use of concepts and workflows.

Stats are designed for simple data types; string or numeric

  • Do not store C# objects
  • Do not store Json blobs

2. Built-In Stats

Beamable automatically creates a specific set of game private stats for each new player. Game makers may read these values if/when its useful for the project's game design.

Stat NameDetail
ADVERTISING_IDThe GAID or IDFA of the device that started the session (If provided)
CLIENT_VERSIONVersion of the client/app which started the session (e.g. 1.0.0)
DATE_INSTALLTimestamp of the player install (first session) expressed as unix time (milliseconds since epoch)
DATE_SESSIONTimestamp of the player's most recent session start expressed as unix time (millisecond since epoch)
DAYS_SINCE_INSTALLTotal number of days that have passed since the player installed. Or in other words, total number of days between the player's first session and most recent session
INSTALL_DATEDate string of the player install (first session) expressed in format yyyy-MM-dd
PURCHASES_3D
PURCHASES_7D
PURCHASES_14D
PURCHASES_28D
Total number of purchases in the last X days

Note: Specifically this refers to X days preceding the most recent player session since stats are not updated when the player doesn't play
PURCHASES_TOTALTotal number of in-app purchases, irrespective of the value of the purchases
SESSIONS_3D
SESSIONS_7D
SESSIONS_14D
SESSIONS_28D
Total number of sessions in the last X days

Note: Specifically this refers to X days preceding the most recent player session since stats are not updated when the player doesn't play
SESSIONS_TOTALTotal number of sessions this player has started
SESSION_DAYSThe total number of days the player has played (i.e. started at least one session)
SPEND_3D
SPEND_7D
SPEND_14D
SPEND_28D
Total player spend (USD) in the last X days

Note: Specifically this refers to X days preceding the most recent player session since stats are not updated when the player doesn't play
SPEND_TOTALTotal player spend (USD) expressed in cents
THORIUM_GAME_DEVICEType of device if provided
THORIUM_GAME_PLATFORMPlatform the player is playing on (e.g. Facebook, iOS)

Note: Unity reports all iOS devices as "iPhonePlayer" regardless of device type.
THORIUM_GAME_SOURCESource of the session (If provided, e.g. "web")
TRIALSTotal list of A/B Testing trials the player is actively associated with (comma delimited list)
locale language ISO code of the player (If provided, e.g. "en")
trialmember:<trial name>Specific trial the player is a part of, with the value being the specific cohort/group the player is associated with (e.g. trialmember:button_trial = blue_button_group)

Game Maker User Experience

During development, the game maker's user experience is as follows:

See Stats » Guide and Stats » Code for more info on creating and using stats.

See Portal for more info on viewing stats.

Advanced

This section contains any advanced configuration options and workflows.

Source Value

The source value is set automatically with each Analytics event and stats

See Analytics » Code (Source Value) for more info.

Stats Vs Analytics

Beamable offers both analytics events and stats.

Unique Benefits

Beamable supports both analytics events and stats. Each use case is unique.

See Analytics » Code (Analytics Events vs Stats) for more info.

Using Both Together

While the use cases for analytics events and stats are often different, there are indeed common workflows where both are used in concert. For example. Beamable automatically tracks an analytics event (deep history) every time a Stat is changed (fast speed). This is the best of both worlds!

See Analytics for more info.

📘

FAQ

Here are highlights from the Beamable FAQ: See FAQ for more info.

Stats