Java Tracker Setup 0.7
🚧 This documentation is for an outdated version of the Java tracker. The latest documentation can be found on the Snowplow documentation site.
HOME > SNOWPLOW SETUP GUIDE > Step 2: setup a Tracker > Java tracker
-
- 2.1 Tracker compatibility
- 2.2 Dependencies
The Snowplow Java Tracker lets you add analytics to your Java-based desktop and server apps, servlets and games. It does not (yet) support Android.
The Tracker should be relatively straightforward to setup if you are familiar with Java development.
Ready? Let's get started.
The Snowplow Java Tracker has been built and tested using JDK6 (JRE 1.6), so should work within any Java application built using JDK6 upwards.
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.
The Tracker is published to Snowplow's hosted Maven repository, which should make it easy to add it as a dependency into your own Java app.
The current version of the Snowplow Java Tracker is 0.7.0.
If you are using Maven for building your Java application, then add the following code into your HOME/.m2/settings.xml
to be able to use this repository:
<settings>
<profiles>
<profile>
<!-- ... -->
<repositories>
<repository>
<id>com.snowplowanalytics</id>
<name>SnowPlow Analytics</name>
<url>http://maven.snplow.com/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Then add into your project's pom.xml
:
<dependency>
<groupId>com.snowplowanalytics</groupId>
<artifactId>snowplow-java-tracker</artifactId>
<version>0.7.0</version>
</dependency>
If you are using Gradle in your own Java application, then add our Maven repository in your build.gradle
file:
repositories {
...
maven {
url "http://maven.snplow.com/releases"
}
}
Then add into the same file:
dependencies {
...
// Snowplow Java Tracker
compile 'com.snowplowanalytics:snowplow-java-tracker:0.7.0'
}
The Snowplow Java Tracker is also usable from Scala. Add this to your SBT config:
// Resolvers
val snowplowRepo = "SnowPlow Repo" at "http://maven.snplow.com/releases/"
// Dependency
val snowplowTracker = "com.snowplowanalytics" % "snowplow-java-tracker" % "0.7.0"
Done? Now read the Java/Android Tracker API to start tracking events.
Home | About | Project | Setup Guide | Technical Docs | Copyright © 2012-2021 Snowplow Analytics Ltd. Documentation terms of use.
HOME » SNOWPLOW SETUP GUIDE » Step 2: Setup a Tracker
- Step 1: Setup a Collector
-
Step 2a: Setup a Tracker
- 2.1: Setup the ActionScript 3.0 Tracker
- 2.2: Setup the Android Tracker
- 2.3: Setup the Arduino Tracker
- 2.4: Setup the Golang Tracker
- 2.5: Setup the iOS Tracker
- 2.6: Setup the Java Tracker
- 2.7: Setup the JavaScript Tracker
- 2.8: Setup the Lua Tracker
- 2.9: Setup the .NET Tracker
- 2.10: Setup the Node.js Tracker
- 2.11: Setup the PHP Tracker
- 2.12: Setup the Pixel Tracker
- 2.13: Setup the Python Tracker
- 2.14: Setup the Ruby Tracker
- 2.15: Setup the Scala Tracker
- 2.16: Setup the Unity Tracker
- Step 2b: Setup a Webhook
- Step 2c: Setup a Data Store Source
- Step 3: Setup Enrich
- Step 4: Setup alternative data stores
- Step 5: Data modeling
- Step 6: Analyze your data!
Useful resources