Skip to main content
A console build sends the same events as a PC build. The difference is where the SDK can keep its anonymous ID, and how the console saves data. This page lists what to check before you ship a console build.

Platform and store values

Each event has context.app.platform and context.app.storefront. Reports split by them in the Platform and Storefront breakdowns and filters. How each SDK sets platform: Set storefront in each console build, as you do for Steam or itch.io builds. Engine and port versions differ, so send one test event from each console build and check its platform on the Activity page.

Keep a stable anonymous ID

The SDK makes a random anonymous ID on the first launch and keeps it in a file: On a PC, this file stays between launches. On a console, a folder can be temporary, or it can need the save data system to keep it. If the file does not stay, each launch makes a new anonymous ID. Then one player counts as many players, and each launch counts as a new install. Make sure the file is in the console’s save data:
  • Check in your platform’s documentation where the engine path goes on that console, and if it is kept after a restart and after a game update.
  • If it is not kept, point the engine path at save data, or keep the SDK files in your save data with the rest of your game’s saves.
  • Test it. Launch the game, quit, and launch again. The second game_open must have is_first_open: false and the same anonymous_id.
Console save data is per user account. So an ID in save data counts a player account on that console, not the console. Two family members on one console are two players. That is usually what you want.

Detect the first open

The SDK sends game_open with is_first_open: true when it finds no saved anonymous ID. Manalens counts that event as an install. So first-open detection is right only when the ID is kept (see above). Things that make a false first open on a console:
  • The SDK file is not in save data, so it is lost at each restart.
  • The player deletes the save data. This is a new install for Manalens, as a reinstall on a PC.
  • Save data that is written but not committed (see Switch).

Use network time for first_open_at

game_open also has first_open_at, the time of the first launch. The SDK takes it from the device clock and keeps it. A console clock can be wrong, for example when the player sets it by hand or the console was never online. Manalens does not use the device clock for the event time. Each request has sent_at, and the collector moves each event to the server’s time. So the install time in reports is right even when the clock is wrong. Only the first_open_at property keeps the device time. If you use first_open_at in your own reports or in your game, get the time from the network instead: from your game server, or from the platform’s network time service. Do not trust the console clock for time-limited rewards or install dates.

Xbox connected storage conflicts

On Xbox, save data in connected storage syncs to the cloud. A player who plays on two consoles, one of them offline, can get a sync conflict. The game must pick one version. If the SDK files are in connected storage, a conflict can bring back an older anonymous ID or a different one. Choose a rule and apply it every time, for example keep the version with the earlier first_open_at. Keep the SDK files and the game save that they belong to together, so that one choice covers both. Connected storage also moves the ID with the player. A player who signs in on a second Xbox keeps the same anonymous ID, so that console does not count as a new install.

Commit save data on Switch

On Nintendo Switch, a write to save data is not kept until the game commits it. If the game stops before the commit, the write is lost. The SDK writes its ID file on the first launch and its queue while the game runs, but it does not commit. Commit the save data after init() on the first launch, and when your game saves. If you do not commit after the first launch, the next launch can make a new ID and count a second install. Commit as the platform rules allow. Commit at the times your game already saves, not after each event.

What certification tests

Each platform holder has its own certification requirements, and they change. Read the current ones in the platform’s developer portal. For analytics, the tests usually cover these areas:
  • No network. The game must work offline and must not wait for the network. The SDKs send in the background and keep events on disk when there is no network, so the game does not wait.
  • Save data. The game must handle full storage, damaged save data, and the save data rules of the platform. Include the SDK files in your save data tests.
  • User accounts. The game must handle a user who signs out, or a change to another user. Call reset() when the active user changes, so that events of the new user do not join the old one.
  • Suspend and resume. The game must resume without errors after the console suspends it. A send that stops during suspend is sent again later.
  • Privacy. The game must follow the platform’s rules for the data it collects and for consent. Tell players about analytics in your privacy policy. Use consent_required (Godot), ConsentRequired (Unity), or Consent Required (Unreal) where consent is necessary.
Do not send a raw platform account ID (for example a PSN account ID or an Xbox user ID) as the user ID. Check the platform’s rules before you send any platform ID. Your own player ID, or no user ID, is safer.