Skip to content

Getting Started

Follow these steps to get up and running with Hoglin:



  1. If you haven’t already created a server in Hoglin, follow the guide. Otherwise, continue to step two.

  2. Add the Hoglin SDK to your project:

    build.gradle.kts
    repositories {
    maven {
    url = uri("https://jitpack.io")
    }
    }
    dependencies {
    implementation("gg.hoglin:sdk:TAG")
    }
    TAG is a placeholder you fetch from JitPack

  3. Configure Hoglin with your server settings:

    val analytics = Hoglin.Builder("<your server key>")
    .autoFlushInterval(5_000L) // How frequent events should be sent
    .maxBatchSize(50) // The maximum amount of events that need to be sent
    .build()
  4. Track your first event anywhere with Hoglin#track:

    @EventHandler
    fun playerJoin(event: PlayerJoinEvent) {
    analytics.track("player_join", mapOf(
    "player_uuid" to event.player.uniqueId
    ))
    }
  5. Log in to your dashboard to see events in real time 🎉

For more information about the SDK, read the SDK Reference