Collecting data with Trackers and Webhooks

  1. Home
  2. Docs
  3. Collecting data with Trackers and Webhooks
  4. Trackers – collecting data from your own applications
  5. JavaScript Trackers (Web and Node.js)
  6. JavaScript Tracker
  7. Self hosting the JavaScript Tracker

Self hosting the JavaScript Tracker

We recommend self-hosting the Snowplow JavaScript Tracker, sp.js, as it has some definite advantages over using a third-party-hosted JavaScript:

  1. Hosting your own JavaScript allows you to use your own JavaScript minification and asset pipelining approach (e.g. bundling all JavaScripts into one minified JavaScript)
  2. As Douglas Crockford put it about third-party JavaScripts: “it is extremely unwise to load code from servers you do not control.”
  3. Renaming sp.js will ensure that Snowplow continues to function in the presence of ad/content blockers, which typically block sp.js (see e.g. EasyPrivacy)

Below are guides for hosting the minified sp.js asset on Amazon Web Services and Google Cloud Platform. This is our recommended strategy for self hosting however there are other options available to self hosting sp.js, you may choose to bundle it into your application directly or host with a different provider as two examples.

The latest minified version of the Snowplow JavaScript Tracker, called sp.js, is available from the JavaScript Tracker GitHub releases.


If you’d like to learn more about Snowplow BDP you can book a demo with our team, or if you’d prefer, you can try Snowplow technology for yourself quickly and easily.