Skip to content

Instantly share code, notes, and snippets.

@dustinlarimer
dustinlarimer / index.html
Last active August 12, 2019 04:45
JS Error Reporting with Keen IO
<!DOCTYPE html>
<html>
<head>
<script src="keen-3.0.0.track.min.js"></script>
<script src="keen-reporter.js"></script>
<script>
!function(){
var keen = new Keen({
projectId: "",
writeKey: "",
@dustinlarimer
dustinlarimer / README.md
Last active September 11, 2018 01:38
Keen IO Geo Coordinates in a Google Map
@dustinlarimer
dustinlarimer / README.md
Last active October 20, 2017 05:40
Ant Colony Optimization in D3.js

Crude implementation of ACO in D3js, based on the awesome work of Joel Wenzel et al.

@dustinlarimer
dustinlarimer / README.md
Last active October 6, 2017 00:23
Github Analytics with Keen IO

Github Analytics with Keen IO

This script will create a series of webhooks to stream event data from your Github organization(s) to a Keen project.

Project ID & API Key

Login to Keen IO to create a project and grab the Project ID and Write Key from your project's Access page. Copy these into the keen.projectId and keen.writeKey fields of the config.json file included with this gist.

Github Access Token

@dustinlarimer
dustinlarimer / histogram.html
Last active June 7, 2017 16:22
Make histograms with keen-js v3
<!DOCTYPE html>
<html>
<head>
<title>Keen IO &#9829; Histograms!</title>
</head>
<body>
<div id="histogram"></div>
<script src="http://d26b395fwzu5fz.cloudfront.net/latest/keen.min.js"></script>
<script>
!function(){
@dustinlarimer
dustinlarimer / index.html
Last active December 19, 2016 23:57
Scroll-tracking with an unload listener
<html>
<head>
<meta charset="utf-8">
<script src="http://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.1.js"></script>
</head>
<body style="height: 9000px;">
<h1>Open your developer console</h1>
<a href="./index.html">Test Page Unload</a>
<script>
/*
@dustinlarimer
dustinlarimer / index.html
Last active December 10, 2016 00:13
This example shows how to record Vimeo Player usage stats with Keen IO. Make sure to include your Keen IO Project ID and Write Key. If you don't have a Keen IO account, create one here for free: http://keen.io/signup
<html>
<head>
<meta charset="utf-8">
<script src="http://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.1.js"></script>
<script src="https://player.vimeo.com/api/player.js"></script>
</head>
<body>
<iframe id="vimeo-player"
src="https://player.vimeo.com/video/76979871"
frameborder="0" height="360" width="640"
@dustinlarimer
dustinlarimer / index.html
Created December 9, 2016 23:50
This example shows how to record Youtube iFrame Player usage stats with Keen IO. Make sure to include your Keen IO Project ID and Write Key. If you don't have a Keen IO account, create one here for free: http://keen.io/signup
<html>
<head>
<meta charset="utf-8">
<script src="http://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.1.js"></script>
</head>
<body>
<iframe id="youtube-iframe-player"
width="640" height="360"
src="https://www.youtube.com/embed/G5UBjF1z9hA?enablejsapi=1"
frameborder="0"
@dustinlarimer
dustinlarimer / index.html
Last active December 9, 2016 04:05
This example shows how to record VideoJS usage stats with Keen IO. Make sure to include your Keen IO Project ID and Write Key. If you don't have a Keen IO account, create one here for free: http://keen.io/signup
<html>
<head>
<meta charset="utf-8">
<script src="http://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.1.js"></script>
<!-- VideoJS Assets -->
<link href="http://vjs.zencdn.net/5.8.8/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.8.8/video.js"></script>
</head>
<body>
@dustinlarimer
dustinlarimer / index.html
Last active December 9, 2016 03:16
This example shows how to record Facebook Video Player usage stats with Keen IO. Make sure to include your Facebook App ID, as well as Keen IO Project ID and Write Key. If you don't have a Keen IO account, create one here for free: http://keen.io/signup
<html>
<head>
<meta charset="utf-8">
<script src="http://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.1.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>
/*
Learn more about the Facebook Video Player API here: