diff options
author | 2019-03-28 12:13:27 +0100 | |
---|---|---|
committer | 2019-03-28 12:13:27 +0100 | |
commit | eb57e4f787d06648dab2c473830dcfbfa168e00c (patch) | |
tree | 5340f3a9f4f181aa990f7a6261a752280fac6cef /src/lib/Menu.js | |
parent | indicate any server interaction with spinners and infoboxes (diff) | |
download | ferdium-app-eb57e4f787d06648dab2c473830dcfbfa168e00c.tar.gz ferdium-app-eb57e4f787d06648dab2c473830dcfbfa168e00c.tar.zst ferdium-app-eb57e4f787d06648dab2c473830dcfbfa168e00c.zip |
add analytic events for workspace actions
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r-- | src/lib/Menu.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 3d6b6c824..d19aa9d6e 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -3,8 +3,9 @@ import { observable, autorun } from 'mobx'; | |||
3 | import { defineMessages } from 'react-intl'; | 3 | import { defineMessages } from 'react-intl'; |
4 | 4 | ||
5 | import { isMac, ctrlKey, cmdKey } from '../environment'; | 5 | import { isMac, ctrlKey, cmdKey } from '../environment'; |
6 | import { workspaceStore } from '../features/workspaces/index'; | 6 | import { GA_CATEGORY_WORKSPACES, workspaceStore } from '../features/workspaces/index'; |
7 | import { workspaceActions } from '../features/workspaces/actions'; | 7 | import { workspaceActions } from '../features/workspaces/actions'; |
8 | import { gaEvent } from './analytics'; | ||
8 | 9 | ||
9 | const { app, Menu, dialog } = remote; | 10 | const { app, Menu, dialog } = remote; |
10 | 11 | ||
@@ -809,6 +810,7 @@ export default class FranzMenu { | |||
809 | accelerator: `${cmdKey}+D`, | 810 | accelerator: `${cmdKey}+D`, |
810 | click: () => { | 811 | click: () => { |
811 | workspaceActions.toggleWorkspaceDrawer(); | 812 | workspaceActions.toggleWorkspaceDrawer(); |
813 | gaEvent(GA_CATEGORY_WORKSPACES, 'toggleDrawer', 'menu'); | ||
812 | }, | 814 | }, |
813 | enabled: this.stores.user.isLoggedIn, | 815 | enabled: this.stores.user.isLoggedIn, |
814 | }, { | 816 | }, { |
@@ -823,6 +825,7 @@ export default class FranzMenu { | |||
823 | checked: !activeWorkspace, | 825 | checked: !activeWorkspace, |
824 | click: () => { | 826 | click: () => { |
825 | workspaceActions.deactivate(); | 827 | workspaceActions.deactivate(); |
828 | gaEvent(GA_CATEGORY_WORKSPACES, 'switch', 'menu'); | ||
826 | }, | 829 | }, |
827 | }); | 830 | }); |
828 | 831 | ||
@@ -835,6 +838,7 @@ export default class FranzMenu { | |||
835 | checked: activeWorkspace ? workspace.id === activeWorkspace.id : false, | 838 | checked: activeWorkspace ? workspace.id === activeWorkspace.id : false, |
836 | click: () => { | 839 | click: () => { |
837 | workspaceActions.activate({ workspace }); | 840 | workspaceActions.activate({ workspace }); |
841 | gaEvent(GA_CATEGORY_WORKSPACES, 'switch', 'menu'); | ||
838 | }, | 842 | }, |
839 | })); | 843 | })); |
840 | } | 844 | } |