Files
2015-07-26 12:17:36 -07:00

36 lines
1.2 KiB
HTML

<!doctype html>
<html class="no-js" lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<script src="jquery-1.11.3.min.js"></script>
<script src="espy.js"></script>
</head>
<body>
<button id="1">1</button>
<button id="2">2</button>
<button id="3">3</button>
<script>
Espy.url = 'http://localhost:8080/analytics/?token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJiaXQiOjIwLCJqdGkiOiJscTBELW1iVTdMdyIsInN1YiI6IkdQVHE2ZTM2c1IifQ.4nefUphoTfhc9095G1lYkorSV25rQVhTm_etLkHmoPOmqK3t6mb0-hFayw_1bKSTKwfSmhgFq_0w0g848U9kYg'
Espy.flushRate = 1
Espy.onflush = function(record) {
var flush = document.getElementById('flush')
if (!flush) {
flush = document.createElement('div')
flush.id = 'flush'
document.body.appendChild(flush)
}
flush.innerHTML = JSON.stringify(record)
}
$('button').on('click', function(event){
Espy('click' + '_' + $(this).attr('id'))
})
</script>
</body>
</html>