Javascript Tracker Not Capturing Events

I have the collector, enrich, and s3 loader ready to go, where I am stuck now is getting the actual tracker to work. I have added the code to the page, and no events are firing. Images attached, hopefully this is an easy one.

Screen Shot 2021-02-11 at 5.45.25 PM

@lkstrategy, your JS tracker reference doesn’t look right - //://... It has to be a valid URL.

I tried it both ways, the documentation has this:

    ;(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","//://{{SUBDOMAIN}}.cloudfront.net/sp.js.cloudfront.net/2.7.2/sp.js","snowplow"));

@lkstrategy, here’s the documentation: Loading the Snowplow tag - Snowplow Docs. And here are the valid JS tracker references (navigate to that site to pick the correct link of the JS tracker version you want to try out): snowplow - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers. For example, the latest version could be referenced by https://cdnjs.cloudflare.com/ajax/libs/snowplow/2.17.2/sp.js. Again, it has to be a valid URL - the part //:// does not constitute a valid URL. You can omit the protocol part so that the refernce can become just //cdnjs.cloudflare.com/ajax/libs/snowplow/2.17.2/sp.js - the protocol will be used the same as your web application automatically in that case.

1 Like

Just to add to Ihor’s answer - the collector endpoint should also omit the protocol (so remove http://).