Skip to main content

Player Identity

GameRebellion uses a layered identity system to track players across sessions and devices.


Identity Layers

LayerSourcePersistenceCross-Device
device_idAuto-generated UUIDPer-device, persisted to diskNo
player_idSet by your gameCustom — you control itYes
idfa / gaidOS advertising IDResettable by playerNo

Setting Player ID

Call TrackEvent with a login event or set the player ID in your initialization flow:

// After the player authenticates in your game:
GameRebellion.TrackEvent("login", JsonUtility.ToJson(new { player_id = "player-12345" }));

For S2S integrations, include player_id in the identifiers block:

{
"identifiers": {
"player_id": "player-12345"
}
}

Best Practices

  • Set player ID as early as possible after authentication to link all subsequent events.
  • Use a stable, unique identifier — your backend user ID is ideal.
  • Never use PII (email, phone) as the player ID.
  • Anonymous players still get a device_id for per-device analytics.