Skip to content

Instantly share code, notes, and snippets.

@zholmquist
Created December 21, 2009 20:49
Show Gist options
  • Save zholmquist/261220 to your computer and use it in GitHub Desktop.
Save zholmquist/261220 to your computer and use it in GitHub Desktop.
<script>
//#function
function track_event(category, action, label)
{
if(window.pageTracker) {
pageTracker._trackEvent(category, action, label);
}
}
//# use.
$('#green-buy-btn').click(function(
track_event('Landing Page', 'Buy Button Clicked','Green Button');
));
$('#blue-buy-btn').click(function(
track_event('Landing Page', 'Buy Button Clicked','Blue Button');
));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment