Sample HTML Track Events

Hi all,

I set up a Snowplow mini in AWS and I am trying to create my own tracking. The Snowplow Mini UI works fine but this sample HTML do nothing.

What am I doing wrong?

  <!-- Snowplow starts plowing -->
  <script type="text/javascript">
    snowplow('newTracker', 'sp', 'http://myip/com.snowplowanalytics.snowplow/tp2', {
        appId: 'my-app-id',
    snowplow('enableActivityTracking', {
      minimumVisitLength: 30,
      heartbeatDelay: 10
<BODY onload="snowplow('trackPageView');">
  <h1>Snowplow Test</h1>
  <a href="" onClick="google();">Track Google</a>
  <a href="" onClick="ad();">Track Ad</a>

For the collector URL you’ll want something like (with no protocol and no path) just the domain / subdomain itself.

Domain and subdomain you mean where the collector has been installed?


@nando_roz, you can use just IP address if myip is actually the IP address of the collector (you can see the pixel when navigating to The point here is, you do not need to add /com.snowplowanalytics.snowplow/tp2 to the URL of the collector in your tracker initialization code. The tracker will add that endpoint automatically if you are using POST method (which it is by default).

However, as Mike pointed out, you should be using proper domain for the collector (again, without /com.snowplowanalytics.snowplow/tp2) since cookie handling depends on the collector name.

The CDN you’re using to load the sp.js file is also deprecated. You should use jsDelivr directly (which the deprecated CDN redirects to). Also 2.9.0 is really out of date.

For v2, you should use

Thank you all. Just to clarify. I am using Snowplow Mini image in AWS Cloud. I messed to upload a Iglu Server config file.

And change de collector information and the CDN.

Now working fine