Created
July 21, 2014 23:23
-
-
Save wetzler/58effe995e42e6c31888 to your computer and use it in GitHub Desktop.
Example of sending an event
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<title>Send Event Test</title> | |
<script type="text/javascript"> | |
!function(a,b){if(void 0===b[a]){b["_"+a]={},b[a]=function(c){b["_"+a].clients=b["_"+a].clients||{},b["_"+a].clients[c.projectId]=this,this._config=c},b[a].ready=function(c){b["_"+a].ready=b["_"+a].ready||[],b["_"+a].ready.push(c)};for(var c=["addEvent","setGlobalProperties","trackExternalLink","on"],d=0;d<c.length;d++){var e=c[d],f=function(a){return function(){return this["_"+a]=this["_"+a]||[],this["_"+a].push(arguments),this}};b[a].prototype[e]=f(e)}var g=document.createElement("script");g.type="text/javascript",g.async=!0,g.src="https://d26b395fwzu5fz.cloudfront.net/3.0.4/keen.min.js";var h=document.getElementsByTagName("script")[0];h.parentNode.insertBefore(g,h)}}("Keen",this); | |
</script> | |
<script> | |
var logger = new Keen({ | |
projectId: "53cd960936bf5a6b2f000000", | |
writeKey: "key" | |
}); | |
// var server = restify.createServer(); | |
request_details = { | |
servername: "hostmyghost.com", | |
route: "/routeyay/", | |
id: 2342353424, | |
request: "Plz do that thing", | |
response: 200 | |
} | |
logger.addEvent("michelle_test", request_details) | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment