-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Java Tracker Setup 0.8
🚧 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
This page refers to version 0.8.0 of the Snowplow Java Tracker.
Documentation for older version of this tracker is available:
- 1 Overview
- 2 Integration options
- 2.1 Tracker compatibility
- 2.2 Dependencies
- 3 Setup
The Snowplow Java Tracker lets you add analytics to your Java-based desktop and server apps, servlets and games.
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 JDK7 (JRE 1.7), so should work within any Java application built using JDK7 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.8.2.
You can also manually insert the Tracker by downloading the jar directly: snowplow-java-tracker-0.8.2.jar
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.8.2</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.8.2'
}
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.8.2"
Done? Now read the Java Tracker API to start tracking events.
Home | About | Project | Setup Guide | Technical Docs | Copyright © 2012-2021 Snowplow Analytics Ltd. Documentation terms of use.
HOME » TECHNICAL DOCUMENTATION
1A. Trackers
Overview
ActionScript3 Tracker
Android Tracker
Arduino Tracker
CPP Tracker
Golang Tracker
Google AMP Tracker
iOS Tracker
Java Tracker
JavaScript Tracker
Lua Tracker
.NET Tracker
Node.js Tracker
PHP Tracker
Pixel Tracker
Python Tracker
Ruby Tracker
Scala Tracker
Unity Tracker
Building a Tracker
1B. Webhooks
Iglu webhook adapter
CallRail webhook adapter
MailChimp webhook adapter
Mandrill webhook adapter
PagerDuty webhook adapter
Pingdom webhook adapter
SendGrid webhook adapter
Urban Airship Connect webhook adapter
Mailgun webhook adapter
StatusGator webhook adapter
Unbounce webhook adapter
Olark webhook adapter
Marketo webhook adapter
Vero webhook adapter
2. Collectors
Overview
Cloudfront collector
Clojure collector (Elastic Beanstalk)
Scala Stream Collector
3. Enrich
Overview
EmrEtlRunner
Stream Enrich
Beam Enrich
Snowplow Event Recovery
Hadoop Event Recovery
C. Canonical Snowplow event model
4. Storage
Overview
Relational Database Shredder
Relational Database Loader
S3 Loader
Elasticsearch Loader
Storage in Redshift
Storage in PostgreSQL
Storage in Infobright (deprecated)
D. Snowplow storage formats (to write)
5. Analytics
Analytics-documentation
Event-manifest-populator
Common
Shredding
Artifact repositories