MultiConnectSDK › SDK Apps
4. Analytics
What is collected without any code
As soon as the SDK key is set, MultiConnectSDK reports:
- From each game client: its session (start, a heartbeat every five minutes, pause and quit), with a random install id made on first run (not a device or advertising id), the platform and the app version.
- From each game server: every minute, the players connected, rooms, matches started and ended, and matchmaking waits and refusals.
Runs in the Unity Editor, and clients using Connect To Local Server, send nothing. That way your own test sessions never count as players. Set McAnalytics.SendFromLocalRuns = true before the game starts to test analytics itself.
Custom events
Record what players do with McAnalytics.Track. You can call it from clients and servers, on any thread.
Rules for event names:
- letters, digits and
_ . : -, up to 64 characters; - up to 10 string properties per event;
- an app may have at most 200 distinct event names, so keep ids out of names. Use
level_completewith alevelproperty, notlevel_3_complete.
Script 4.1: Track an event
using System.Collections.Generic;
using MultiConnect;
public static class GameEvents
{
public static void LevelComplete(int level, int stars)
{
McAnalytics.Track("level_complete", new Dictionary<string, string>
{
{ "level", level.ToString() },
{ "stars", stars.ToString() }
});
}
}
Events are sent with the next report, within about a minute.
Where to see it
Open the app on SDK Apps and choose the Analytics card. It has five tabs:
| Tab | What it shows |
|---|---|
| Overview | Players online or peak players, and matches started |
| Players | Daily active and new users, retention, sessions, session length, platforms, app versions and countries |
| Matchmaking | Matches, time to a room, find-room requests, average wait and peak rooms |
| Servers | Every server process that reported in the last hour |
| Events | Your custom events, with a breakdown by property |
Setup on the app page has the switches Collect analytics, Player sessions and Custom events. A running game obeys a change on its next report, without a new build.

