TopStats SDK

.NET analytics SDK

Multi-targets net8.0 and netstandard2.0, so the same package powers an ASP.NET Core API and mod-framework runtimes like CounterStrikeSharp and OpenMod. Capture buffers and a background loop batches; FlushAsync and ShutdownAsync drain deterministically.

Install

dotnet add package TopStats.Analytics  # NuGet soon; CI-built feed today

Capture your first event

var client = new TopStatsClient(
    Environment.GetEnvironmentVariable("TOPSTATS_API_KEY")!,
    new TopStatsClientOptions { DefaultSource = "api" });

client.Capture("report_exported", new Dictionary<string, object?> { ["rows"] = 500 },
    new CaptureContext { Actor = "user-3" });
await client.ShutdownAsync();

Behaviour you can rely on

Every other language

Your first event is minutes away.

Twelve language SDKs, middleware for nine web frameworks, plugins for seven games, and raw HTTP - all working today. Free plan, 2M events a month, no card.