★ Founding developer program: Pro free for 90 days for the first 50 developers →
DocsQuickstart

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.

Updated · by Skilled

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

DataDashboard pagePlan
Active servers, new installs, servers lost, players onlineOverviewFree
Plugin, Minecraft and Java versions, platform, countryServersFree
Every command and subcommand used, by players or the consoleEventsFree
Uncaught exceptions from your code, groupedErrorsFree
/<plugin> report and suggest for players and admins, with the errors and logs before each bug reportReportsFree
Servers still running your plugin after each day or weekRetentionPro
Player first joins, the start of player funnelsFunnelsPro
Your config.yml choices and how many servers changed each defaultConfig usagePro
Which of your depend/softdepend plugins servers haveConfig usagePro
Your plugin's log linesLogsPro
Where your plugin spends main-thread time, by methodPerformancePremium

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.