Skip to content

Instantly share code, notes, and snippets.

@Lytol
Created October 13, 2010 20:28
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 Lytol/624828 to your computer and use it in GitHub Desktop.
Save Lytol/624828 to your computer and use it in GitHub Desktop.
// Track user clicks on specified links
//
$("a.track").click(function(event) {
var link = $(this).attr("href");
var category = $(this).attr("rel");
if(!category) {
category = "General";
}
_gaq.push(['_trackEvent', category, link]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment