Created
May 14, 2013 15:10
-
-
Save jwebgordon/5576695 to your computer and use it in GitHub Desktop.
Custom JS to add click track event listeners to all elements of a particular class
This should be added to the Custom Javascript in Hubspot Events
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
var all_buttons = $('.buttons'); | |
for(var i=0; i<all_buttons.length; i++){ | |
_hsq.push(["trackClick", "#"+all_buttons.eq(i).attr('id'), "test2"+all_buttons.eq(i).attr('id')]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment