Forked from philippamarkovics/Open link in new window if track is playing
Created
September 30, 2010 15:43
-
-
Save sudara/604779 to your computer and use it in GitHub Desktop.
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
document.addEvent('click:relay(a)', function(event, link) { | |
console.log('stopped event'); | |
event.stop(); | |
(function() { | |
console.log('sending google trackEvent'); | |
var pageTracker = _gat._getTracker('UA-241978-7'); | |
pageTracker._trackEvent('external', link.get('href')); | |
window.open(link.get('href')); | |
}).delay(100); | |
return; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment