As part of our commitment to a loosely-coupled architecture for Snowplow, where possible we extract Snowplow functionality into standalone code components and libraries, which you can use in your own software development – even if you’re not using Snowplow.
We publish these code components and libraries to the following artifact repositories:
- RubyGems.org – for all Ruby libraries
- maven.snplow.com – for all Java, Scala and Clojure libraries
To take each in turn:
RubyGems.org
RubyGems.org is the Ruby community’s gem hosting service. You can find all of our published libraries listed under our snowplow username.
Available libraries
Current libraries are:
- referer-parser – extracts search marketing attribution data from referrer URLs (GitHub repo)
- Infobright Loader – our data loader for Infobright (GitHub repo)
Using in your project
Add an appropriate line to your application’s Gemfile, for example:
gem 'referer-parser'
Code language: JavaScript (javascript)
And then execute:
$ bundle
maven.snplow.com
maven.snplow.com is our self-hosted Maven repository, where we publish jars for Java, Scala and Clojure libraries.
Available libraries
There are three currently:
- Scala Util – reusable Scala code from Snowplow Analytics
- RefererParser – referer URL parsing in Java/Scala
- Scala MaxMind Geo-IP – Scala wrapper for the MaxMind Java Geo-IP library
Using in your project
Scala
Add this repository to your SBT config:
val snowplow = "Snowplow Analytics Maven repo" at "http://maven.snplow.com/releases/"
Code language: JavaScript (javascript)
Clojure
Add this into your project.clj
for Leiningen:
:repositories [["Snowplow Analytics Maven repo" "http://maven.snplow.com/releases/"]
...]
Code language: CSS (css)
Java
Following code can be merged 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>
Code language: HTML, XML (xml)
See also
As well as these repositories for Snowplow code components and libraries, the Snowplow Analytics team also provide public hosting for some of the Snowplow sub-components.
Please see the Hosted assets docs page for more information.