Snowplow Node.js Tracker 0.2.0 released
Version 0.2.0 of the Snowplow Node.js Tracker is now available! This release changes the Tracker’s architecture and adds the ability to send Snowplow events via either GET
or POST
.
Read on for more information…
1. Emitters
This release brings the Node.js Tracker’s API closer to those of other trackers with the addition of Emitters, objects which control how and when the events created by the Tracker are sent to the Snowplow collector. A Tracker object can be configured with one or more Emitters, and sends each event to all Emitters associated with it. This enables you to send events to multiple endpoints, like this:
This example creates 2 emitters. The first sends events one at a time to a Cloudfront Collector using GET; the second batches up events until it has 10, then sends them to a Scala Stream Collector using POST. We only fire a single event in the example, so to make the second emitter send its batch it is necessary to explicitly call the flush
method.
Note also that the callback argument to the tracker
function is now an argument to the emitter
function instead.
2. Vagrant quickstart
We have added a Vagrant quickstart to the project. If you have VirtualBox and Vagrant installed, you can now easily set up a Snowplow Node.js Tracker development environment:
3. Getting help
For more detailed information, check out the technical documentation.
If you find any bugs with the Node.js Tracker, please create a GitHub issue.
Finally, if you need help getting set up or want a new feature, please [get in touch] [talk-to-us].