New: see how many SpigotMC page viewers end up running your plugin →

Quickstart

Two minutes from zero to your first data. You need a plugin built with Gradle or Maven and a free account.

1. Create a project

Sign in to the dashboard and add your plugin. 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.

2. Add the SDK

Gradle (Kotlin DSL)

plugins {
    id("com.gradleup.shadow") version "8.3.9"
}

repositories {
    maven("https://pluginanalytics.dev/maven")
}

dependencies {
    implementation("com.gamepathics:pluginanalytics-bukkit:1.0.0")
}

tasks.shadowJar {
    relocate("com.gamepathics.pluginanalytics", "your.plugin.libs.analytics")
}

Maven

<repository>
  <id>pluginanalytics</id>
  <url>https://pluginanalytics.dev/maven</url>
</repository>

<dependency>
  <groupId>com.gamepathics</groupId>
  <artifactId>pluginanalytics-bukkit</artifactId>
  <version>1.0.0</version>
</dependency>

<!-- maven-shade-plugin -->
<relocation>
  <pattern>com.gamepathics.pluginanalytics</pattern>
  <shadedPattern>your.plugin.libs.analytics</shadedPattern>
</relocation>

Relocation is required. Without it two plugins could ship different copies of the SDK in the same package, so the SDK refuses to run unrelocated and logs a warning.

3. Start it

public final class MyPlugin extends JavaPlugin {
    private PluginAnalytics analytics;

    @Override
    public void onEnable() {
        analytics = PluginAnalytics.start(this, "pa_your_key");
    }
}

That's all. It stops by itself when your plugin is disabled.

4. See your first data

The first report is sent 3 to 6 minutes after the server starts (spread out so servers restarting together don't arrive at once), then hourly. To see it right away on a test server, add a JVM flag:

java -Dpluginanalytics.firstDelay=10 -jar paper.jar

Set log-sent-data: true in plugins/PluginAnalytics/config.yml to print every report in the console.

What you get without writing more code

DataWhere
Active servers, new installs, servers lost, retentionOverview, Retention
Players onlineOverview
Plugin, Minecraft and Java versions, platform, country, OS, coresServers
Uncaught exceptions from your codeErrors
Player first joins (the start of player funnels)Funnels
Every command and subcommand used, by players or the consoleEvents, Funnels
Your config.yml choices and how many servers changed each defaultConfig usage
Which of your depend/softdepend plugins servers haveServers
Time spent in your event handlers and commandsPerformance
Your plugin's log linesLogs