We are pleased to announce the release of the Snowplow Java Tracker version 0.2.0.
This release comes shortly after we introduced the community-contributed event tracker a little more than a week ago. In that previous post, we also mentioned our roadmap for the Java Tracker to include Android support as well as numerous other features. This release doesn’t directly act on that roadmap, but is largely a refactoring for future releases of the tracker with a few minor features.
I’ll talk more about the new additions made further down in this post:
- Tracker constructor
- Renamed method calls
- Jackson JSON Processor support
- TransactionItem class
- Constant & Parameter classes
One of the TrackerC constructors seemed unnecessary so we decided to remove it. The only way to construct a Tracker object now is with the following signature:
We wanted the Java tracker to follow the more native naming convention of Java classes, so method names have been renamed from using underscores for word separators into the camel casing convention. Here are a few examples of renamed method calls:
We are standardizing on Jackson for all JSON manipulation on the JVM, so it made sense to do so on the Java Tracker as well. Uses of
JSONObject have been replaced with
JsonNode with futher changes coming to newer releases.
Previously, when calling
trackEcommerceTransactionItem, you needed to pass in a
List<Map<String, String>> that represented all transaction items. This was weakly typed, and we felt it would be better to provide a
TransactionItem class that can be used to create individual items. With this change, you now pass a
List<TransactionItem> to the tracker instead.
An early introduction of a Constant & Parameter class that would be used to store various string constants and keys from the Snowplow Tracker Protocol respectively. We wanted to keep a unified place to keep code clean and place for users to add their own keys for unstructured events.
Some minor changes include initial unit tests, Travis build support, renamed classes, and general code clean up. For more details on this release, please check out the 0.2.0 Release Notes on GitHub.
The Snowplow Java Tracker is quite new and is rapidly being developed. We’d love to hear of any feature suggestions from you, or even help setting up the tracker. Feel free to get in touch with us, or raise an issue if you find any bugs.