Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
terkelg
GitHub Repository: terkelg/ramme
Path: blob/master/app/src/main/analytics.js
106 views
1
const firstRun = require('first-run')
2
const Insight = require('insight')
3
4
const pkg = require('../../package')
5
6
const trackingCode = 'UA-87371303-1'
7
8
const insight = new Insight({
9
trackingCode,
10
pkg
11
})
12
13
exports.init = function () {
14
if (firstRun()) {
15
insight.track('install')
16
}
17
18
if (firstRun({name: `${pkg.name}-${pkg.version}`})) {
19
}
20
}
21
22
exports.track = function (...paths) {
23
insight.track(...paths)
24
}
25
26