Created
March 10, 2014 00:41
-
-
Save scien/9457480 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
initKeenIO: (project_id, write_key) -> | |
window.Keen = window.Keen || { | |
configure: (e) -> | |
this._cf = e | |
addEvent: (e,t,n,i) -> | |
this._eq = this._eq || [] | |
this._eq.push [e,t,n,i] | |
setGlobalProperties: (e) -> | |
this._gp = e | |
onChartsReady: (e) -> | |
this._ocrq = this._ocrq || [] | |
this._ocrq.push e | |
} | |
Keen.configure { | |
projectId: project_id | |
writeKey: write_key | |
} | |
k = document.createElement 'script' | |
k.type = 'text/javascript' | |
k.async = true | |
url = 'dc8na2hxrj29i.cloudfront.net/code/keen-2.1.0-min.js' | |
k.src = "#{document.location.protocol}//#{url}" | |
s = document.getElementsByTagName("script")[0] | |
s.parentNode.insertBefore k, s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment