Skip to main content
Version: SDK 6.0.x

Set up the SDK

The justtrack SDK provides powerful tracking capabilities for attribution, events, and more.

This guide shows you how to add the justtrack SDK to your Android app.

Add the SDK dependency

In your settings.gradle, add the justtrack Maven repository:

dependencyResolutionManagement {
repositories {
// ... your other repositories
maven(url = "https://sdk.justtrack.io/maven")
}
}

Then, in your module-level build.gradle, add the SDK dependency:

dependencies {
implementation("io.justtrack:justtrack-android-sdk:6.0.0")
}

Please view the latest version here.

Find your API token

For the next step, you'll need to obtain an API token. Follow our guide to find your API token.

Instantiate the SDK

The main entry point to the SDK is the JustTrackSdk interface. Create an SDK instance using the JustTrackSdkBuilder:

class MainActivity : Activity() {
private lateinit var sdk: JustTrackSdk

override fun onCreate(savedInstanceState: Bundle?) {
// ...
sdk = JustTrackSdkBuilder(this, "...paste your API token here").build()
}
}

That’s it!

Once instantiated, JustTrackSdk is ready to attribute your users. See our guide on tracking events next.