Snowplow Node.js Tracker 0.4.0 released

We’re pleased to announce the release of version 0.4.0 of the Snowplow Node.js Tracker.

This release improves the developer experience by adding type support, introduces a new emitter based on the got library, bumps the snowplow-tracker-core library to the latest version, adding support for new properties as well as a number of under the hood improvements and bug fixes.

You can install the Snowplow Node.js Tracker with NPM or Yarn:

npm install snowplow-tracker

or

yarn add snowplow-tracker

If you are already using the snowplow-tracker library, and wish to upgrade, then as this is a pre-1.0.0 release you will need to force installation to the latest or specific version rather than using npm update.

npm install snowplow-tracker@latest

New API Documentation
You can find API documentation for this release available here: https://snowplow.github.io/snowplow-nodejs-tracker/
Documentation on docs.snowplowanalytics.com will be updated shortly (this post will be updated when available).

Breaking Changes
This release contains two breaking changes.

  1. emitter is no longer available. This was based on the deprecated request library so has now been removed in favour of the new got library.
    You should switch from emitter to gotEmitter which continues to offer the same functionality but also includes a number of new features.
    Note there are some differences in the API when creating a gotEmitter, take a look at the gotEmitter documentation here: https://snowplow.github.io/snowplow-nodejs-tracker/modules/got_emitter.html

  2. If you are using trackEcommerceTransaction and passing in an array of items, you should now switch to using trackEcommerceTransactionWithItems. This change was made as previous the Node.js tracker releases overwrote the trackEcommerceTransaction function from snowplow-tracker-core so it wasn’t available. This change makes the API clearer and allows the original trackEcommerceTransaction available in snowplow-tracker-core to be used. You can find the documentation on this function here: https://snowplow.github.io/snowplow-nodejs-tracker/interfaces/tracker.tracker.html#trackecommercetransactionwithitems

New Features
Add setNetworkUserId method (#23)
Add setDomainUserId method (#24)
Add support for dvce_sent_tstamp (#27)
Switch from ‘request’ to ‘got’ (#61)
Bump snowplow-tracker-core to 0.9.1 (#58)
Add Typescript support (#13)

Bug Fixes
Update flush to not send a request if the buffer is empty (#53)

Under the hood
Update project dependencies (#49)
Switch to RollupJS for building ES Module and CJS versions (#57)
Bump NodeJS to support active LTS releases (#55)
Switch out Mocha for Ava (#59)
Switch to GitHub Actions (#54)
Add Snyk support (#60)
Remove Vagrant image (#56)

1 Like