TopStats for Garry's Mod
Garry's Mod analytics your gamemode can build on.
Whether you run DarkRP, TTT or a custom gamemode, the questions are the same: who plays, how long, and what keeps them coming back. TopStats answers them with a small server-side addon: sessions with durations, deaths with causes, and a server-stats heartbeat, all charted live.
The interesting part is TopStats.Track: your gamemode and other addons post their own events - jobs taken, rounds won, items bought - through one global, and they land in the same dashboards. SteamID64 actors keep player history whole across name changes.
Tracked automatically
player_connected / player_droppedwith session seconds, bots ignored
player_deathcause classified as player, world or entity
server_statsplayers, capacity, map and uptime on a heartbeat
ConVars and done
- Drop the addon into garrysmod/addons/.
- Set the convars in server.cfg.
- Restart. Sessions and deaths start charting.
topstats_api_key "ts_live_..."
topstats_source "gmod"
topstats_heartbeat_seconds 60Common questions
Does it run on the client?
No - server realm only. Your API key never reaches players, and nothing content-shaped (no chat, no positions) is ever sent.
How do I track gamemode-specific events?
TopStats.Track("round_won", { gamemode = "ttt" }, { actor = ply:SteamID64(), actor_label = ply:Nick() }) from any server-side script. The addon buffers and batches; your code never waits on HTTP.