TopStats for Roblox
Roblox analytics that live on your servers, not in a black box.
Roblox gives you aggregate charts; TopStats gives you your own event stream. A server-side Luau module captures player sessions with durations and a server-stats heartbeat (players, capacity, place version, private-server flag), and lets your game scripts track anything - rounds, purchases, progression - as first-class events in your own workspace.
UserId is the actor, so display-name changes never split a player’s history. Everything batches server-side, far inside HttpService’s request budget, and the buffered tail flushes through BindToClose on shutdown.
Tracked automatically
player_connected / player_droppedPlayerAdded and PlayerRemoving, with session seconds
server_statsplayers online, MaxPlayers, place version, private-server flag
Require and init
- Add the Wally package (or drop the rbxm into ServerScriptService).
- Enable HTTP requests in Game Settings.
- Init from a server Script - never a client one.
local TopStats = require(game.ServerScriptService.topstats)
local analytics = TopStats.init({ api_key = "ts_live_..." })
analytics.track("match_started", { queue = "ranked" })Common questions
Will it hit the HttpService rate limit?
No - events batch into a single request per flush, hundreds of events at a time, far inside the 500 requests/minute budget even on full servers.
Is the API key safe?
Keep the module and its config in server-side containers (ServerScriptService / ServerStorage) and the key never replicates to clients. Never put it in ReplicatedStorage.