Info
- Sessions, events and recordings of the app's players and dedicated servers, under
/api/v2/analytics. Paths below leave that part out
- Needs the Analytics service on for the app, otherwise 403
service_disabled
- Every call sends a Bearer token: a player's or a server's. Without one 401
- A session belongs to whoever sent its first batch. Another player's or server's session id answers 400
invalid_request
- 300 calls a minute per token
- Bad input answers 400
invalid_request, its detail says what's wrong. Sending the same call again won't help
- Base URL, headers, errors, lists and
Idempotency-Key work as on the API page
- Unity side: Analytics in Unity Core
Sessions and events
POST /batches - events of one session with the session's details. Send it again after a failure, nothing is stored twice
session - id (a GUID the app makes at start, required), started_at, app_version, build_number, channel, platform, device, os, headset, resolution, refresh_rate, language. The first value sent for each one stays
- Left out,
app_version, build_number, channel, platform, device and os come from the X-App-Version, X-App-Build, X-App-Channel, X-App-Platform, X-App-Device and X-App-Os headers
events - up to 500, else 400 invalid_request. Each has seq (counts up from 1 within the session), name, optional occurred_at (the hub's receive time when left out), properties and category
ended_at - the app quit, the session ends then
crashed_session_id - an earlier session of the same player or server that didn't end cleanly, sent on the next launch. It ends as a crash at its last event
catalog - what the build can collect, with the session's first batch, see Data categories
- Answers
stored (new events), dropped (per category, events left out because the category isn't collected for the player now), recordings (whether the hub takes recordings) and max_recording_bytes (the session's recording limit)
- Events with a
seq the hub already has are skipped. A repeated seq within one batch refuses it
- A batch without events keeps the session open. Sessions that get nothing for 30 min end as timed out at their last event, a later batch opens them again
- Names of events, properties and recording columns: 1 to 64 letters, digits,
., - or _. Properties are flat: text, numbers, true/false or null, up to 4 KB per event. One bad event refuses the whole batch
$values - an event that sets the session's own values, e.g. the condition. A null value removes one. It doesn't count as an event
Data categories
catalog.categories lists what the build can collect, up to 200
id - 1 to 64 of a-z, 0-9, ., -, _
kind - events or recording
name - shown on the hub and in study consents, up to 100 characters
default - usage or study
events for event categories, columns and rate_hz for recordings
- The newest build's catalog leads on the hub. Categories only older builds send stay listed
- Events name their
category. A recording's name is its category
- Collected for a player now
- Events without a category, always
- Usage categories while they share usage data. Analytics Managers pick them on the hub, until then the catalog's
default decides. Categories no catalog lists count as usage
- The categories they agreed to in a running study, even with sharing off