summaryrefslogtreecommitdiffstats
path: root/webapp/actions/global_actions.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions/global_actions.jsx')
-rw-r--r--webapp/actions/global_actions.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index 5def48858..efff5076a 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -17,6 +17,7 @@ import {loadProfilesAndTeamMembersForDMSidebar} from 'actions/user_actions.jsx';
import {loadChannelsForCurrentUser} from 'actions/channel_actions.jsx';
import {stopPeriodicStatusUpdates} from 'actions/status_actions.jsx';
import * as WebsocketActions from 'actions/websocket_actions.jsx';
+import {trackEvent} from 'actions/diagnostics_actions.jsx';
import Constants from 'utils/constants.jsx';
const ActionTypes = Constants.ActionTypes;
@@ -28,7 +29,6 @@ import * as Utils from 'utils/utils.jsx';
import en from 'i18n/en.json';
import * as I18n from 'i18n/i18n.jsx';
-import {trackPage} from 'actions/analytics_actions.jsx';
import {browserHistory} from 'react-router/es6';
export function emitChannelClickEvent(channel) {
@@ -53,7 +53,6 @@ export function emitChannelClickEvent(channel) {
AsyncClient.getChannelStats(chan.id, true);
AsyncClient.viewChannel(chan.id, oldChannelId);
loadPosts(chan.id);
- trackPage();
});
// Mark previous and next channel as read
@@ -94,6 +93,10 @@ export function emitInitialLoad(callback) {
global.window.mm_config = data.client_cfg;
global.window.mm_license = data.license_cfg;
+ if (global.window && global.window.analytics) {
+ global.window.analytics.identify(global.window.mm_config.DiagnosticId);
+ }
+
UserStore.setNoAccounts(data.no_accounts);
if (data.user && data.user.id) {
@@ -515,6 +518,8 @@ export function emitSearchMentionsEvent(user) {
terms = termKeys.join(' ');
}
+ trackEvent('api', 'api_posts_search_mention');
+
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_SEARCH_TERM,
term: terms,