Setup
See here for the documentation for the latest version.
Integration optionsβ
Tracker compatibilityβ
The Snowplow Java Tracker has been built and tested using Java versions 8, 11 and 13, so should work within any Java application built using JDK8 upwards.
Dependenciesβ
To minimize jar bloat, we have tried to keep external dependencies to a minimum. For the full list of dependencies, please see ourΒ Gradle build file.
Setupβ
Installationβ
These instructions are for version 0.11 of the Snowplow Java Tracker.
You can also manually insert the Tracker by downloading the jar directly:Β snowplow-java-tracker-0.11.0.jar
Mavenβ
Add into your project'sΒ pom.xml
:
<dependency>
<groupId>com.snowplowanalytics</groupId>
<artifactId>snowplow-java-tracker</artifactId>
<version>0.11.0</version>
</dependency>
Gradleβ
Add into your project's build.gradle
:
dependencies {
// Snowplow Java Tracker
implementation 'com.snowplowanalytics:snowplow-java-tracker:0.11.0'
}
From v0.10.1 you can also specify the feature variants via Gradle, to pull in the required optional dependencies.
Adding OkHttp Supportβ
dependencies {
implementation 'com.snowplowanalytics:snowplow-java-tracker:0.11.0'
implementation ('com.snowplowanalytics:snowplow-java-tracker:0.11.0') {
capabilities {
requireCapability 'com.snowplowanalytics:snowplow-java-tracker-okhttp-support:0.11.0'
}
}
}
Adding ApacheHttp Supportβ
dependencies {
implementation 'com.snowplowanalytics:snowplow-java-tracker:0.11.0'
implementation ('com.snowplowanalytics:snowplow-java-tracker:0.11.0') {
capabilities {
requireCapability 'com.snowplowanalytics:snowplow-java-tracker-apachehttp-support:0.11.0'
}
}
}
SBTβ
The Snowplow Java Tracker is also usable from Scala. Add this to your SBT config:
// Dependency
val snowplowTracker = "com.snowplowanalytics" % "snowplow-java-tracker" % "0.11.0"