diff options
author | 2019-04-16 09:44:45 +0200 | |
---|---|---|
committer | 2019-04-16 09:44:45 +0200 | |
commit | 7c8aca45bd649b372ea623fc980769f5e9142405 (patch) | |
tree | e60aa825e3c0924cf5a49a6ee9239e725ae9af0c /src/features | |
parent | provide dummy version if lastSeenAnnouncementVersion is null (diff) | |
download | ferdium-app-7c8aca45bd649b372ea623fc980769f5e9142405.tar.gz ferdium-app-7c8aca45bd649b372ea623fc980769f5e9142405.tar.zst ferdium-app-7c8aca45bd649b372ea623fc980769f5e9142405.zip |
Add analytics events
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/announcements/index.js | 2 | ||||
-rw-r--r-- | src/features/announcements/store.js | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/features/announcements/index.js b/src/features/announcements/index.js index c087689a7..4658b976f 100644 --- a/src/features/announcements/index.js +++ b/src/features/announcements/index.js | |||
@@ -3,6 +3,8 @@ import { AnnouncementsStore } from './store'; | |||
3 | 3 | ||
4 | const debug = require('debug')('Franz:feature:announcements'); | 4 | const debug = require('debug')('Franz:feature:announcements'); |
5 | 5 | ||
6 | export const GA_CATEGORY_ANNOUNCEMENTS = 'Announcements'; | ||
7 | |||
6 | export const announcementsStore = new AnnouncementsStore(); | 8 | export const announcementsStore = new AnnouncementsStore(); |
7 | 9 | ||
8 | export default function initAnnouncements(stores, actions) { | 10 | export default function initAnnouncements(stores, actions) { |
diff --git a/src/features/announcements/store.js b/src/features/announcements/store.js index bb54abc46..1abc305fd 100644 --- a/src/features/announcements/store.js +++ b/src/features/announcements/store.js | |||
@@ -8,10 +8,12 @@ import semver from 'semver'; | |||
8 | import localStorage from 'mobx-localstorage'; | 8 | import localStorage from 'mobx-localstorage'; |
9 | 9 | ||
10 | import { FeatureStore } from '../utils/FeatureStore'; | 10 | import { FeatureStore } from '../utils/FeatureStore'; |
11 | import { GA_CATEGORY_ANNOUNCEMENTS } from '.'; | ||
11 | import { getAnnouncementRequest, getChangelogRequest, getCurrentVersionRequest } from './api'; | 12 | import { getAnnouncementRequest, getChangelogRequest, getCurrentVersionRequest } from './api'; |
12 | import { announcementActions } from './actions'; | 13 | import { announcementActions } from './actions'; |
13 | import { createActionBindings } from '../utils/ActionBinding'; | 14 | import { createActionBindings } from '../utils/ActionBinding'; |
14 | import { createReactions } from '../../stores/lib/Reaction'; | 15 | import { createReactions } from '../../stores/lib/Reaction'; |
16 | import { gaEvent } from '../../lib/analytics'; | ||
15 | 17 | ||
16 | const LOCAL_STORAGE_KEY = 'announcements'; | 18 | const LOCAL_STORAGE_KEY = 'announcements'; |
17 | 19 | ||
@@ -98,6 +100,8 @@ export class AnnouncementsStore extends FeatureStore { | |||
98 | dispose(); | 100 | dispose(); |
99 | }, | 101 | }, |
100 | ); | 102 | ); |
103 | |||
104 | gaEvent(GA_CATEGORY_ANNOUNCEMENTS, 'show'); | ||
101 | }; | 105 | }; |
102 | 106 | ||
103 | @action _hideAnnouncement() { | 107 | @action _hideAnnouncement() { |