I set-up Snowplow mini to test it out and I can’t get the collector to work with custom tracking. I copied the tracker it uses internally and switched in the endpoint as describe in https://snowplowanalytics.com/blog/2016/04/08/introducing-snowplow-mini/. This gives me the following code:
<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","https://d1fc8wv8zag5ca.cloudfront.net/2.8.2/sp.js","snowplow"));
var collector = window.location.host;
window.snowplow('newTracker','rt','18.221.107.105:8080', {
encodeBase64: false,
appId: 'notsnowplowmini',
platform: 'web',
contexts: {
webPage: true,
performanceTiming: true
}
});
window.snowplow('setUserId', 'NotSnowplowMini-User');
window.snowplow('enableActivityTracking', 10, 10);
</script>
<!-- Snowplow stops plowing -->
And that doesn’t seem to work. Any ideas on what I’m doing wrong?