diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-04-23 22:27:07 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-04-23 22:27:07 +0200 |
commit | 68a03fc47b28ccadc30a0b6cf36b7b12d2d19847 (patch) | |
tree | ab32e7e7ea7e3784aed5c5a74de5d2ceec76774a /src | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-68a03fc47b28ccadc30a0b6cf36b7b12d2d19847.tar.gz ferdium-app-68a03fc47b28ccadc30a0b6cf36b7b12d2d19847.tar.zst ferdium-app-68a03fc47b28ccadc30a0b6cf36b7b12d2d19847.zip |
add appstart event
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/analytics.js | 2 | ||||
-rw-r--r-- | src/stores/AppStore.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/analytics.js b/src/lib/analytics.js index 663aafe22..c305fdb00 100644 --- a/src/lib/analytics.js +++ b/src/lib/analytics.js | |||
@@ -42,7 +42,7 @@ export function gaEvent(category, action, label) { | |||
42 | export function statsEvent(key, value) { | 42 | export function statsEvent(key, value) { |
43 | const params = { | 43 | const params = { |
44 | key, | 44 | key, |
45 | value, | 45 | value: value || key, |
46 | platform: process.platform, | 46 | platform: process.platform, |
47 | version: remote.app.getVersion(), | 47 | version: remote.app.getVersion(), |
48 | }; | 48 | }; |
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index e68e797ef..72c4b4d0b 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -14,7 +14,7 @@ import Request from './lib/Request'; | |||
14 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 14 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
15 | import { isMac } from '../environment'; | 15 | import { isMac } from '../environment'; |
16 | import locales from '../i18n/translations'; | 16 | import locales from '../i18n/translations'; |
17 | import { gaEvent, gaPage } from '../lib/analytics'; | 17 | import { gaEvent, gaPage, statsEvent } from '../lib/analytics'; |
18 | import { onVisibilityChange } from '../helpers/visibility-helper'; | 18 | import { onVisibilityChange } from '../helpers/visibility-helper'; |
19 | import { getLocale } from '../helpers/i18n-helpers'; | 19 | import { getLocale } from '../helpers/i18n-helpers'; |
20 | 20 | ||
@@ -174,6 +174,8 @@ export default class AppStore extends Store { | |||
174 | reaction(() => this.stores.router.location.pathname, (pathname) => { | 174 | reaction(() => this.stores.router.location.pathname, (pathname) => { |
175 | gaPage(pathname); | 175 | gaPage(pathname); |
176 | }); | 176 | }); |
177 | |||
178 | statsEvent('app-start'); | ||
177 | } | 179 | } |
178 | 180 | ||
179 | @computed get cacheSize() { | 181 | @computed get cacheSize() { |