Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created November 3, 2012 13:30
Show Gist options
  • Save bradoyler/4007387 to your computer and use it in GitHub Desktop.
Save bradoyler/4007387 to your computer and use it in GitHub Desktop.
user-authenticated event tracking with jQuery in a Razor View
$(function () {
$('a').mousedown(function () {
_gaq.push(['_trackEvent', 'userClick', $(this).attr('href'), '@User.Identity.Name']);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment