Collecting Data

More than 20 SDKs available

Snowplow has 20 SDKs available for different programming languages. You can collect events client-side and/or server-side.

Google Tag Manager Custom Templates

Snowplow created two GTM templates to facilitate the implementation of Snowplow within Google Tag Manager. Please see their documentation for complete reference.

Javascript V2 Tracker

Please read the complete documentation on Snowplow v2 JS Tracker.

Tracking events is simple, first load the sp.js tracker, then initialize it, and it is ready to track events.

Snowplow recommends renaming sp.js as this file name is commonly blocked by adblockers. Renaming to a random string will help ensure the JavaScript Tracker is loaded as expected. It is also recommended to host the Javascript tracker under your domain.

Tracker setup and initialization with basic options.

  // Load the Tracker
  (function(p, l, o, w, i, n, g) {
    if (!p[i]) {
      p.GlobalSnowplowNamespace = p.GlobalSnowplowNamespace || [];
      p[i] = function() {
        (p[i].q = p[i].q || []).push(arguments);
      p[i].q = p[i].q || [];
      n = l.createElement(o);
      g = l.getElementsByTagName(o)[0];
      n.async = 1;
      n.src = w;
      g.parentNode.insertBefore(n, g);

  // Initialization
  window.snowplow("newTracker", "cf", "", {
    appId: "yourappid",
    discoverRootDomain: true,
    cookieSameSite: "Lax", // Recommended
    contexts: {
      webPage: true,

Tracking a page view, and a page view with schema.

  var context = [
      schema: "iglu:com.vendor/schema_name/jsonschema/1-0-0",
      data: {
        datapoint: "Value",
        second_datapoint: "Other value",

  snowplow("trackPageView", null, context);