Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TopStats for Counter-Strike 2

Official TopStats Analytics plugin for CS2 servers, built on CounterStrikeSharp and the TopStats.Analytics SDK.

Tracks automatically once an API key is set:

  • player_connected / player_dropped with session duration and map - SteamID64 as the actor so name changes never split a player's history, bots ignored.
  • round_ended with winner and round number, map_changed.
  • server_stats heartbeat: players online, max players, map, uptime.

Install

  1. Install CounterStrikeSharp on the server.
  2. Drop the TopStats folder from the latest release into addons/counterstrikesharp/plugins/.
  3. Set the API key in configs/plugins/TopStats/TopStats.json:
{
  "api_key": "ts_live_...",
  "source": "cs2",
  "track_sessions": true,
  "track_rounds": true,
  "heartbeat_seconds": 60
}

Create the key in your workspace under Settings, then API keys.

Custom events from other plugins

var topstats = // capability lookup for the TopStats plugin instance
topstats.Tracker?.Track("bomb_defused", new Dictionary<string, object?>
{
    ["site"] = "B",
}, steamId, playerName);

The SDK buffers and batches off the game thread; nothing blocks a tick, and your API key never appears in logs.

Docs: https://docs.topstats.gg/docs/analytics

About

Official TopStats Analytics plugin for Counter-Strike 2 (CounterStrikeSharp). Automatic server analytics plus a Track API.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages