Snowplow Mini JS Tracker not able to send events to Collector

Hi Guys,

Have been putting my head into setting up this for a long time now. I made an e-Commerce website using Magento, and then I am adding JS tracker to this after setting up & running my Snowplow Mini instance on AWS. Everything shows up perfectly on Snowplow, even the Example Events are working fine, but I don’t know why using JS tracker I am unable to end events to my Snowplow Mini collector so as to subsequently display it in Kibana Discover

I am adding the below JS in my in my Magento application. I even tried using this JS tracker code in other web applications, it still does not work. Would be great if anyone can help me here, I’m stuck.

<!-- Snowplow starts plowing -->
      <script type="text/javascript">
    var collector = "";
             appId: "snw6"
snowplow(function () { console.log("sp.js has loaded"); });
snowplow('enableActivityTracking', 10, 10);
console.log("Adding Item");
          '000000002',           // order ID - required
          'Minerva LumaTech™ V-Tee',        // product name
          'Blue XS',   // category or variation
          '32.00',          // unit price - required
          '1'               // quantity - required
     <!-- Snowplow stops plowing -->

Really don’t know where am going wrong.


@Kuzhal, is your Magento eCommerce site accessed via HTTPS (secure web site)? If so then maybe you have a problem loading the JS tracker which you access via HTTP (non-secure content)


You might want to replace with //

On a side note, I would recommend JS tracker 2.10.2 which has fixes for a few bugs in 2.10.0.

Additionally, addItem method on its own will not work. You need to create a transaction, add item(s) to that transaction and then push it to the collector with trackTrans:

Still, I would expect you to be able to track pageviews.

Have you checked the requests in Developer Console of the browser (Console and Network tabs)? Do any errors appear in there? Just wonder if

  • you load the JS tracker
  • you send the events to the collector
  • any Javascript errors preventing tracking code to function