Skip to content

Analytics (Unity)

FRVRSDK.Analytics covers the events every game should send: onboarding (FTUE), level funnels, and arbitrary custom events.

Steps are intended to be sequential — the underlying Web SDK ignores out-of-order re-reports of earlier steps. The Unity layer just forwards (stepNumber, stepName) as-is, so the dedup is server-side.

FRVRSDK.Analytics.LogFTUE(1, "learn_to_jump");
FRVRSDK.Analytics.LogFTUE(2, "learn_to_doublejump");
FRVRSDK.Analytics.LogLevelStart("level_1");
// ... play
FRVRSDK.Analytics.LogLevelEnd("level_1");

Pair every LogLevelStart with a LogLevelEnd — it’s how the funnel dashboards compute completion rates.

FRVRSDK.Analytics.LogEvent("shop_open", "{}");
FRVRSDK.Analytics.LogEvent("bought_skin", "{\"skin\":\"red_hat\",\"slot\":\"head\"}");

The payload is a JSON string. Keep field names snake_case and values flat where possible.

  • Event names: snake_case, past‑tense where it’s a completed action (bought_skin, opened_shop).
  • Field keys: snake_case.
  • Consistent game name: every event gets tagged with the gameId FRVR’s pipeline injected — don’t duplicate it in custom fields.

These behaviours are handled by the underlying Web SDK (not the Unity layer — the C# module just forwards each call to JS); they’re listed here so you know not to duplicate them in game code.

  • Don’t batch events yourself — the Web SDK queues them.
  • Don’t gate on consent — events are queued until the CMP resolves, then dispatched or dropped appropriately.
  • Don’t track page_loading / game_loaded / device_info — the Web SDK fires these automatically at the right moments.