Quickstart
From zero to your first data in a few minutes. You need a plugin or mod built with Gradle or Maven and a free account.
1. Create a project
Sign in to the dashboard. A new account shows the form right away (later, it's Add a plugin or mod): name it and pick what it is: a plugin (Spigot, Paper, Purpur, Folia), a Velocity or BungeeCord plugin, or a Fabric or NeoForge mod. The install steps then show the code for that platform. You get a project key that starts with pa_. It's safe to ship inside your jar: it can only send data, never read it.
This page shows a Paper plugin. Proxies and mods use the same steps with their own artifact and start call: Proxies & mods.
2. Add the SDK
Add the repository and the dependency, and relocate the package when you shade it (Gradle Kotlin DSL shown; Groovy and Maven are here):
plugins {
id("com.gradleup.shadow") version "8.3.9"
}
repositories {
maven("https://pluginanalytics.dev/maven")
}
dependencies {
implementation("com.gamepathics:pluginanalytics-bukkit:1.8.0")
}
tasks.shadowJar {
archiveClassifier.set("")
relocate("com.gamepathics.pluginanalytics", "me.you.arenaplus.libs.analytics")
}
tasks.build {
dependsOn(tasks.shadowJar)
}
Build with ./gradlew build and use the jar from build/libs: it's the one with the SDK inside.
Relocation is required. An unrelocated copy turns itself off and logs a warning. Why
3. Start it
public final class ArenaPlus extends JavaPlugin {
private PluginAnalytics analytics;
@Override
public void onEnable() {
saveDefaultConfig();
analytics = PluginAnalytics.start(this, "pa_your_key");
}
}
That's the whole integration. It never throws, never blocks, and stops by itself when your plugin is disabled.
4. See your first data
Start your server and keep the dashboard open. The first batch of data goes out 15 to 45 seconds after startup, and the dashboard switches from the setup screen to your data by itself, within seconds. From then on, everything updates live while the dashboard is open.
What happens in between, and what to check if nothing shows up.
What you get without writing more code
| Data | Dashboard page | Plan |
|---|---|---|
| Active servers, new installs, servers lost, players online | Overview | Free |
| Plugin, Minecraft and Java versions, platform, country | Servers | Free |
| Every command and subcommand used, by players or the console | Events | Free |
| Uncaught exceptions from your code, grouped | Errors | Free |
/<plugin> report and suggest for players and admins, with the errors and logs before each bug report | Reports | Free |
| Servers still running your plugin after each day or week | Retention | Pro |
| Player first joins, the start of player funnels | Funnels | Pro |
| Your config.yml choices and how many servers changed each default | Config usage | Pro |
| Which of your depend/softdepend plugins servers have | Config usage | Pro |
| Your plugin's log lines | Logs | Pro |
| Where your plugin spends main-thread time, by method | Performance | Premium |
On a plan without a feature, the SDK doesn't even collect its data: it starts when you upgrade. Commands and report/suggest are added on Spigot, Paper and Purpur; on Folia, proxies and mods, see what each platform supports. Plans
Then add events where something worth knowing happens.
Complete example plugins for Paper, Velocity and BungeeCord, ready to build: pluginanalytics-examples on GitHub.