Skip to main content

Snowplow Setup Guide

Prerequisites

  • A Snowplow Tracker running on your website or app.

Setup Guide

Step 1: Initialize Snowplow Tracker

  1. Copy the collector webhook URL that Matia shows for this asset.

    It looks like https://webhooks.matia.io/snowplow/<id>

  2. Open your page's HTML and paste the snippet below inside <head>.
  3. Replace <WEBHOOK_URL> with the collector webhook URL from step 1.
  4. Fill in <APP_ID> with any string that identifies your app, and <COOKIE_DOMAIN> with the domain Snowplow should use for its cookies.
  5. Initialize the tracker in Snowplow
<script type='text/javascript'>
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);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)}}(window,document,'script','//cdn.jsdelivr.net/gh/snowplow/sp-js-assets@2.15.0/sp.js','snowplow'));
window.snowplow('newTracker', 'cf', '<WEBHOOK_URL>', {
appId: <APP_ID>,
cookieDomain: <COOKIE_DOMAIN>,
post: true
});
window.snowplow('trackPageView');
</script>

Step 2: Complete Configuration in Matia

  1. Enter an Asset Name.
  2. (Optional) Enter a Description.
  3. (Optional) Assign Tags.
  4. Select an Owner.
  5. Click Connect.