Repository navigation
Scala tracker setup
HOME > SNOWPLOW SETUP GUIDE > Step 2: setup a Tracker > Scala tracker
The Snowplow Scala Tracker lets you add analytics to your Scala apps and servers.
Setting up the tracker should be relatively straightforward if you are familiar with sbt.
The Tracker is published to Maven Central and JCenter, which should make it easy to add it as a dependency into your own Scala app.
Add the Scala Tracker to your build.sbt like this:
resolvers += "JCenter" at "https://jcenter.bintray.com/" // you can omit if you're planning to use Maven Central
libraryDependencies += "com.snowplowanalytics" %% "snowplow-scala-tracker" % "0.3.0"If you are using Gradle in your own Scala application, then add our Maven repository in your build.gradle file:
repositories {
...
jcenter()
}Then add into the same file:
dependencies {
...
// Snowplow Scala Tracker
compile 'com.snowplowanalytics:snowplow-scala-tracker_2.10:0.3.0'
}Notice a _2.10 postfix in artifactId. This is used for Scala libraries and denote Scala version which artifact (in our case snowplow-scala-tracker) is compiled against. It also means that this library will bring a org.scala-lang:scala-library_2.10.x as transitive dependency and if you're using any other Scala dependency you should keep these postfixes in accordance (snowplow-scala-tracker is also compiled against Scala 2.11).
If you are using Maven for building your Scala 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>central</id>
<name>bintray</name>
<url>https://jcenter.bintray.com/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray-plugins</name>
<url>http://jcenter.bintray.com</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>bintray</activeProfile>
</activeProfiles>
</settings>Then add into your project's pom.xml:
<dependency>
<groupId>com.snowplowanalytics</groupId>
<artifactId>snowplow-scala-tracker_2.10</artifactId>
<version>0.2.0</version>
</dependency>Notice a _2.10 postfix in artifactId. This is used for Scala libraries and denote Scala version which artifact (in our case snowplow-scala-tracker) is compiled against. It also means that this library will bring a org.scala-lang:scala-library_2.10.x as transitive dependency and if you're using any other Scala dependency you should keep these postfixes in accordance (snowplow-scala-tracker is also compiled against Scala 2.11).
Scala Tracker is published on JCenter and Maven Central since version 0.3.0. Previous versions can be found on Snowplow's hosted Maven repository.
Done? Now read the Scala Tracker API to start tracking events.
Home | About | Project | Setup Guide | Technical Docs | Copyright © 2012-2017 Snowplow Analytics Ltd
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