I have successfully setup scala-stream-collector in my local computer (ubuntu) where i have run it using stdout. Some of my collector configuration are:
collector.port=8383
collector.cookie.domains=[“localhost:8282”]//here i am trying to track page view for another project setup in that port (will it work for testing or not?)
Than I have setup Javascript Tracker for integrating snowplow javascript tracking tags directly onto website.
<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","http://localhost:8282/js/sp.js","snowplow"));
window.snowplow('newTracker', 'cfZanui', 'localhost:8383', { // Initialise a tracker
appId: 'zanuihostjsappid',
cookieDomain: 'localhost:8282'
});
window.snowplow('trackPageView');
</script>
But i get the CORS error
Help me since i am new on this!