Skip to content

Commit

Permalink
use the beacon API
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts authored and ungoldman committed Aug 10, 2017
1 parent 75652b0 commit 2d4ccb9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
var jsSyntax = require('highlight-syntax/js')
var Highlight = require('highlight-syntax')
var nanobeacon = require('nanobeacon')
var mount = require('choo/mount')
var html = require('choo/html')
var css = require('sheetify')
var choo = require('choo')
var path = require('path')
var fs = require('fs')

if (typeof window === 'object') {
window.addEventListener('DOMContentLoaded', function () {
nanobeacon('https://analytics.choo.io', { type: 'load' })
}, false)

window.addEventListener('unload', function () {
nanobeacon('https://analytics.choo.io', { type: 'unload' })
}, false)
}

var highlight = Highlight([ jsSyntax ])

css('tachyons')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"choo": "^4.0.0",
"highlight-syntax": "^3.0.2",
"highlight-syntax-pastel": "^1.0.0",
"nanobeacon": "^1.0.0",
"tachyons": "^4.5.6",
"vhs": "^0.2.0"
},
Expand Down

0 comments on commit 2d4ccb9

Please sign in to comment.