overleaf/services/web/public/coffee/main/event-tracking.coffee
Henry Oswald 57ad5e4182 - migrated event tracking to new pages/angular
- hooked up the search field on projects to search on keypress
2014-07-21 11:35:05 +01:00

17 lines
329 B
CoffeeScript

define [
"base"
], (App) ->
App.factory "event_tracking", ->
return {
send: (category, action, label, value)->
ga('send', 'event', category, action, label, value)
}
#header
$('.navbar a').on "click", (e)->
href = $(e.target).attr("href")
if href?
ga('send', 'event', 'navigation', 'top menu bar', href)