4 ms·
why did they need the javascript void link in the first place anyway?
by rodh257 16y ago
why did they need the javascript void link in the first place anyway?
- bearwithclaws 16y agoI'm using Mixpanel to track the crucial events such as downloads and purchase: http://mixpanel.com/api/docs/guides/integration#js http://mixpanel.com/api/docs/guides/integration#js Not sure if there's a better way to do it.
- paraschopra 16y agoJust attach it externally. Do something like this: <a href="URL_TO_PDF" onclick="registerConversion()">Download</a> You can put a minor 500 ms pause so that event gets registered.
- subbu 16y agoEven better, use unobtrusive js to do that: $('your element').click(function(){//put calls to mixpanel here; return true; });
- bearwithclaws 16y agoThanks for all the suggestions. I've implemented it: $("a.magcloud").click(function() { mpmetrics.track('purchase', {'issue': '#1'}); self.delay(500); return true; });