sp.jswill 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.
If you don't need all the functionality included in
sp.js, there is also a
sp.lite.js bundle for v3 that includes fewer plugins.
For more custom requirements, you can build your own v3 bundle using your own selection of plugins, which is only an option if you are self-hosting.
📄️ Creating a white-label build
Every time the snowplow tracker loads on the page, a queue-like object GlobalSnowplowNamespace is initialised on the global window scope. This object is then used to queue commands before the tracker snippet (sp.js) has fully loaded.
📄️ Third Party CDN Hosting