diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-09-05 05:55:44 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-09-05 05:55:44 -0400 |
| commit | 6e54781979301dbec5886da2d9df94764197ff56 (patch) | |
| tree | decae153ab675a19d73ed457ce27373920c89c3f /static/js | |
| parent | 40bc9c45fcc73edb126c5e04321afc5d175f0cd0 (diff) | |
Use try-catch for google analytics
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/pichat.js | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js index 36e4087..13cdeb0 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -480,6 +480,27 @@ function refresh() { }); } +function sendClicked(){ + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('UI', 'SendButtonActuallyClicked', + typeof Nick !== 'undefined' ? Nick : 'anon'); + } + submitMessage() + + +} + +function paletteClicked(){ + if (typeof pageTracker !== 'undefined') { + pageTracker._trackEvent('UI', 'FavPaletteActuallyClicked', + typeof Nick !== 'undefined' ? Nick : 'anon'); + } + paletteToggle() + + +} + + function initChat() { Search.init() @@ -491,8 +512,8 @@ function initChat() { }); $('#msgInput').keyup(ifEnter(submitMessage)); - $('#msgSubmit').click(submitMessage); - $('#palette-button').click(paletteToggle); + $('#msgSubmit').click(sendClicked); + $('#palette-button').click(paletteClicked); messageList = $("#messageList")[0] |
