TopStats for FiveM / RedM
FiveM server analytics as a drop-in resource.
Your RP city already generates the data - connects, drops, session lengths, job changes, purchases. TopStats turns it into live dashboards with one resource: start it, set your key in server.cfg, done. The same build runs on RedM, because the resource declares game "common" and touches only natives both CitizenFX runtimes share.
Players are identified by their license identifier, so the same person stays one actor across sessions, restarts and name changes. Any other resource on the server posts its own events through exports.topstats:track() - no HTTP code, no batching logic, the buffered client does the work.
Tracked automatically
player_connectedas players join the city
player_droppedwith the reason and session length
server_statsplayers online, capacity and uptime on a heartbeat
server.cfg and go
- Drop the resource folder into resources/ and add ensure topstats.
- Set the convars in server.cfg.
- Restart. Connects and drops appear in your workspace within seconds.
ensure topstats
set topstats_api_key "ts_live_..."
set topstats_source "fivem" # use "redm" on RedM serversCommon questions
Does it work on RedM?
Yes - one build for both games. The fxmanifest declares game "common" and the resource uses only server-side natives shared by FiveM and RedM. Set topstats_source "redm" to keep the two distinguishable in your workspace.
Can my ESX / QBCore scripts send custom events?
Yes. Any resource calls exports.topstats:track(name, properties, context) and the event goes through the same buffered, batched client - job changes, purchases, heists, whatever your city counts.
What identifies a player?
The license identifier: stable across reconnects and name changes, so player history never fragments. Nothing content-shaped - no chat, no positions - is ever sent.