Skip to content

Analytics (Cocos)

The Cocos wrapper exposes a compact analytics surface: level start/end events. These are the events every game should send, and they drive the funnel dashboards on FRVR’s side.

// When a level begins
FRVRSDK.instance.levelStart('level_1');

// ...player plays...

// When the level ends — pass the same id you opened with
FRVRSDK.instance.levelEnd('level_1');

Always pair a levelStart with exactly one levelEnd for the same id. Incomplete pairs throw off completion‑rate dashboards.

  • Level ids: snake_case, scoped (world1_level3, not just level3).
  • Game‑mode qualifiers: fold into the id (endless_hard, daily_2026_04_24) rather than passing extra fields.
  • Don’t batch events yourself — the underlying SDK queues them.
  • Don’t gate on consent — events queue until the CMP resolves, then dispatch or drop based on the result.
  • Built‑in events (page_loading, game_loaded, device_info) fire automatically.
  • Full event taxonomy, FTUE patterns, custom events, logValuedEvent: Web SDK analytics. These are exposed by the underlying SDK but not surfaced through the current Cocos wrapper.