I’m using version 2.8.1 and I started getting this warning that stops the execution of the rest of the events related to the click.
Snowplow: Tracker namespace co already exists.
d.warn @ sp.js:33
q @ sp.js:29
s @ sp.js:29
I’m tracking this using GTM (the code in window.snowplow is the same I was using before moving to GTM):
<!-- Snowplow event tracking -->
<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","//d1fc8wv8zag5ca.cloudfront.net/2.8.1/sp.js","snowplow"));
window.snowplow('newTracker', 'co', '{{Snowplow Cloudfront Bucket}}', {
appId: '{{Snowplow App ID}}',
platform: 'web'
});
window.snowplow('trackUnstructEvent', {{event_json}});
</script>
All the event on my page are getting tacked by the same tag, since all of them are unstructured events. I based my solution on https://discourse.snowplow.io/t/firing-unstructured-events-custom-contexts-within-google-tag-manager/260.
As you can see co
is the value set for the new tracker.
If you go to this page https://staging.chefsfeed.com/ and click on any of the buttons of the navbar you can see the warning on the console.
Normally this will log the event data and then take you to the correct page, now it logs the data, send the warning and stops there.
Any ideas?