Re:Hacker Monthly #1 is here
by rodh257 on Tuesday June 01, 2010 @06:57AM
(#1394777)
why did they need the javascript void link in the first place anyway?
[ Parent
| on HN ]
Re:Hacker Monthly #1 is here
by bearwithclaws on Tuesday June 01, 2010 @07:09AM
(#1394787)
I'm using Mixpanel to track the crucial events such as downloads and purchase: http://mixpanel.com/api/docs/guides/integration#js
Not sure if there's a better way to do it.
Re:Hacker Monthly #1 is here
by paraschopra on Tuesday June 01, 2010 @08:09AM
(#1394864)
Just 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.
Even better, use unobtrusive js to do that: $('your element').click(function(){//put calls to mixpanel here; return true; });
Re:Hacker Monthly #1 is here
by bearwithclaws on Tuesday June 01, 2010 @10:49PM
(#1396870)
Thanks for all the suggestions. I've implemented it:
$("a.magcloud").click(function() {
mpmetrics.track('purchase', {'issue': '#1'});
self.delay(500);
return true;
});