Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created November 3, 2012 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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