diff options
Diffstat (limited to 'src/lib/analytics.js')
-rw-r--r-- | src/lib/analytics.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/analytics.js b/src/lib/analytics.js index b13bf8faa..585cbcdba 100644 --- a/src/lib/analytics.js +++ b/src/lib/analytics.js | |||
@@ -2,6 +2,8 @@ import { remote } from 'electron'; | |||
2 | import { GA_ID } from '../config'; | 2 | import { GA_ID } from '../config'; |
3 | // import { isDevMode } from '../environment'; | 3 | // import { isDevMode } from '../environment'; |
4 | 4 | ||
5 | const debug = require('debug')('Analytics'); | ||
6 | |||
5 | const { app } = remote; | 7 | const { app } = remote; |
6 | 8 | ||
7 | /* eslint-disable */ | 9 | /* eslint-disable */ |
@@ -28,13 +30,13 @@ ga('send', 'App'); | |||
28 | export function gaPage(page) { | 30 | export function gaPage(page) { |
29 | ga('send', 'pageview', page); | 31 | ga('send', 'pageview', page); |
30 | 32 | ||
31 | console.debug('GA track page', page); | 33 | debug('GA track page', page); |
32 | } | 34 | } |
33 | 35 | ||
34 | export function gaEvent(category, action, label) { | 36 | export function gaEvent(category, action, label) { |
35 | ga('send', 'event', category, action, label); | 37 | ga('send', 'event', category, action, label); |
36 | 38 | ||
37 | console.debug('GA track page', category, action); | 39 | debug('GA track page', category, action); |
38 | } | 40 | } |
39 | 41 | ||
40 | setTimeout(() => { | 42 | setTimeout(() => { |