Created
June 26, 2012 20:18
-
-
Save mdigital/2998640 to your computer and use it in GitHub Desktop.
Google Analytics Outbound Link Tracking in CoffeeScript
This file contains 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
$('a[href^="http"]').on 'click', (e) -> | |
e.preventDefault | |
_gaq.push(['_trackEvent', 'Outbound', 'click', this.href]) | |
callback = -> window.location = arguments[0] | |
setTimeout callback, 200, this.href |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment