Analytics SDK
Track events
Sessions and game pass purchases are automatic. Add a handful of calls for the moments you care about.
-- Progression: tutorial and levels (Start, Complete or Fail, then up to 3 parts)
ShipLua:TrackProgression(player, "Start", "Tutorial")
ShipLua:TrackProgression(player, "Complete", "Tutorial")
-- Design: anything else worth counting, as Part:Part names
ShipLua:TrackDesign(player, "Quest:Complete:Dragon")
-- Economy: where soft currency comes from and goes
ShipLua:TrackResource(player, "Sink", "Coins", 250, "Shop", "Sword")
-- Developer products: call from your ProcessReceipt handler
ShipLua:TrackDeveloperProduct(receiptInfo)
-- Funnels: numbered steps of a flow
ShipLua:TrackFunnelStep(player, "Shop", 1, "Opened")
-- Errors you catch yourself
ShipLua:TrackError(player, "Shop:Purchase", "Inventory full")Naming
- Use PascalCase parts joined by colons, up to five parts:
Quest:Complete:Dragon. Explore and funnels can match a prefix such asQuest:*. - Keep names a fixed vocabulary. Put changing values in the number argument or in up to 20 small properties, never in the name.
- Never send names, chat or free text from players. Roblox user ids are turned into a private key per experience before anything is stored.
What each page uses
- Realtime, Engagement, Distributions: sessions (automatic).
- Monetization: game passes (automatic) and developer products.
- Funnels: any two to ten events in order, such as tutorial steps. Save one to open the same steps again.
- Health: errors with
TrackErrors = true, server FPS and memory withTrackPerformance = true.
Next: A/B testing.