moved ga code out of coffeescript file because of scoping and closures