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
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 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).
This release contains two breaking changes.
emitteris no longer available. This was based on the deprecated
requestlibrary so has now been removed in favour of the new
You should switch from
gotEmitterwhich 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
If you are using
trackEcommerceTransactionand 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
snowplow-tracker-coreso it wasn’t available. This change makes the API clearer and allows the original
snowplow-tracker-coreto be used. You can find the documentation on this function here: https://snowplow.github.io/snowplow-nodejs-tracker/interfaces/tracker.tracker.html#trackecommercetransactionwithitems
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)
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)