Created
March 27, 2013 14:18
-
-
Save amitavroy/5254500 to your computer and use it in GitHub Desktop.
This code shows how to add an event to a click or other user event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.tab').click(function() { | |
$(this).show(); | |
var eventCategory = jQuery(this).attr('data-category'); | |
var eventAction = jQuery(this).attr('data-action'); | |
var eventLabel = window.document.title; | |
_gaq.push(['_trackEvent', eventCategory, eventAction, eventLabel]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment