Hi there!
I have noticed a very frustrating issue with the js tracker when used in the head area. I see a bunch of errors and also no cookies are generated. I do see it callign the pixel with the query parameters, but no ajax-driven event and form trackers work anymore.
Here’s the error I get on page load:
Uncaught TypeError: Cannot read property 'split' of undefined
at v (sp.js:30)
at u (sp.js:31)
at new d.InQueueManager (sp.js:31)
at new f.Snowplow (sp.js:57)
at Object.17../snowplow (sp.js:31)
at c (sp.js:9)
at e (sp.js:9)
at sp.js:9
The page view events do fire though, as I can see from the network activity and loading of the pixel. However, any custom events throw undefined errors and do not fire off the pixel. Has anyone experienced this? I also don’t see any sp_ cookies being generated on the site (searching using chrome tools). I am using the stock js tracker implementation ie:
<!-- Snowplow starts plowing -->
<script type="text/javascript" async=1>
;(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","http://d1fc8wv8zag5ca.cloudfront.net/2.7.0/sp.js","snowplow"));
window.snowplow('newTracker', 'scala', 'statscollector-dev.site.com', {
appId: 'ih.www.local',
platform: "web"
});
window.snowplow('trackPageView');
</script>
<!-- Snowplow stops plowing -->
I have trying to debug this for a few days but no luck
Thanks very much!