Created
April 15, 2013 21:59
-
-
Save gaboesquivel/5391615 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
window.track = (event_name, event_description) -> | |
analytics.track(event_name) unless typeof analytics == 'undefined' | |
mixpanel.track(event_name) unless typeof mixpanel == 'undefined' | |
ga_track_event(event_name, event_description) | |
window.logActionKPI = (name) -> | |
$.get "/api/kpis/log_action", { kpi: { name: name } } | |
$ -> | |
$("[tracked-click]").live "click", -> | |
event_name = $(this).attr("tracked-click") | |
console.log event_name | |
track(event_name, "click") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment