I’ve included Snowplow tracking on a basic static site but when I click on a link it’s showing in the network tab as a page view.
Is this a bug or user error?
Below is the static HTML to reproduce:
<!doctype html>
<html lang="en">
<head>
<!-- Snowplow starts plowing -->
<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://d1fc8wv8zag5ca.cloudfront.net/2.9.2/sp.js","snowplow"));
window.snowplow('newTracker', 'cf', 'app.snowplow-collector.com/', { // Initialise a tracker
appId: 'app-name',
cookieDomain: 'app-domain',
forceSecureTracker: true
});
window.snowplow('enableActivityTracking', 30, 10);
window.snowplow('trackPageView');
window.snowplow('enableLinkClickTracking', null, true, true);
window.snowplow('refreshLinkClickTracking');
</script>
<!-- Snowplow stops plowing -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<title>Application</title>
</head>
<body>
<a href="" class="tracked">TEST</a>
<div id="root"></div>
</body>
</html>
This is the AJAX request that happens:
https://app.snowplow-collector.app.io//i?stm=1534773418079&e=pv&url=file%3A%2F%2F%2FUsers%2Fdarren.haken%2Fworkarea%2Ftmp%2Fsnowplow-tracker%2Findex.html&page=Metrics%20Triage&tv=js-2.9.2&tna=cf&aid=APP&p=web&tz=Europe%2FLondon&lang=en-US&cs=UTF-8&f_pdf=1&f_qt=0&f_realp=0&f_wma=0&f_dir=0&f_fla=1&f_java=0&f_gears=0&f_ag=0&res=2560x1440&cd=24&cookie=1&eid=dcccabf4-e7f5-43f3-8999-d86e5d034686&dtm=1534772950317&vp=2520x1306&ds=2520x1306&vid=1&sid=aea647a5-5494-42dd-94ba-9f6b2291357f&duid=eb453020-cbed-4e2b-8538-1f0d2980b821&fp=3185976282