- The platform and store values, so reports split console players from PC players.
- A stable anonymous ID in console save data, so one player is one player.
- Each install counted once, so installs are not counted again after a restart or an update.
The Unreal plugin builds for console targets from plugin 0.14.0: its
Manalens module excludes only tvOS and visionOS. Send one test event from each console build before you ship.Platform and store values
Each event hascontext.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. Also check whether 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_openmust haveis_first_open: falseand the sameanonymous_id.
Detect the first open
If the SDK finds no saved anonymous ID, it sendsgame_open with is_first_open: true. Manalens counts that event as an install. So first-open detection needs a kept ID (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, 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 ingestion API moves each event to the server’s time. So the install time in reports is right, even with a wrong clock. 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 earlierfirst_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 afterinit() on the first launch. Commit it again each time 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.
Send from the game or through your server
We recommend that the console build sends its events with the SDK. The SDK sets the platform, the store, the device details, and the first open for you. Some games send their events to their own game server first. Your server can then send them to Manalens with the server events API and the secret key. Do these steps for each event that your server sends:- Set
context.appwithplatformandstorefront, for exampleps5andpsn. Reports then split the event by console. - Set
anonymous_id,user_id, or both, so that the event joins the correct player. Foruser_id, use your own player ID. - To get the country, send the player’s IP address in
context.ip.
- Manalens uses
context.iponly to find the country, in memory. It does not store the IP address. - Install network matching does not run on server events. A first open that comes through your server is not matched to a website visit.
- Manalens keeps only some
contextfields of a server event:app,page,locale, the country, the device, OS, and browser, and the library name and version. It does not keepcontext.screen,context.system, orcontext.utc_offset. So reports have no device details for these events.
context field.
Attribution on console
A console store gives the game no click ID and no store referrer. So Manalens cannot read the campaign from the install, as it does with the Google Play install referrer. Use these ways to connect a console player to a campaign. The first ones are the most certain.- The same user ID on your website and in the game. If the player signs in on your website and in the game with one account, identify the player with the same user ID in both. See identify users. Use your own player ID (see what certification tests).
- The cross-domain link.
GetCrossDomainUrl()(Unity and Unreal) andget_cross_domain_url()(Godot) add the anonymous ID to a website URL. Use it only where the platform lets a game open a web page. See one player on the website and in the game. - UTM links to your website. Add
utm_fields to the links that go to your website. The website visit then has the campaign. A user ID, a cross-domain link, or a network match connects the visit to the install. Manalens reads store campaign data only from Steam UTM Analytics and from the Google Play install referrer. It reads no campaign data from PlayStation, Xbox, or Nintendo stores. - The network match. Manalens matches the first
game_openof a console build to website visitors on the same network, as on a PC. See install attribution. The match compares the operating system of the website visitor with the operating system of the game. The operating system of a console is usually not the one of the website visitor’s device, so a console match usually haslowconfidence. To leave out these matches, set Match confidence to Medium and high on the Installs report.
Store sales data
Manalens imports store data from Steam and from itch.io. See Steam and itch.io. Manalens does not import sales from PlayStation, Xbox, or Nintendo. To see console revenue, track the purchases yourself:- In the game: send a
purchaseevent withrevenueandcurrency. See revenue from custom events. - From your server: after your server checks the purchase with the platform, send a server event with the same
purchasename. See server events.
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. With no network, they keep events on disk, 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. When the active user changes, call
reset(). Then 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.