$(document).on('click', '#test', function() { window.snowplow('trackStructEvent', 'test', 'click');<html><head> <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.4.2/sp.js","snowplow")); window.snowplow('newTracker', 'cf', 'subdomain.domain.com', { // Initialise a tracker appId: 'TEST-SITE-ID' }); window.snowplow('trackPageView'); </script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript"> $(document).on('click', '#test', function() { window.snowplow('trackStructEvent', 'test', 'click'); }); </script>
</head><body> <h1>Test</h1> <button id="test">Test</button></body> </html>--
You received this message because you are subscribed to the Google Groups "Snowplow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snowplow-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yes, it's by design. We have a milestone to add a debug mode to the tracker to help in these kinds of situation:
https://github.com/snowplow/snowplow-javascript-tracker/milestones/Debug%20mode
Cheers,
Alex
--