diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-26 08:16:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-26 08:16:57 -0400 |
commit | 23ccfc845ca2350075f6027e16c6206fc7b71716 (patch) | |
tree | 3fd1f896a5a24b43913be03b21c85638dd7c356e /webapp/actions/diagnostics_actions.jsx | |
parent | fe7e9d95b30ae2195fcba68db960866db91ce045 (diff) | |
download | chat-23ccfc845ca2350075f6027e16c6206fc7b71716.tar.gz chat-23ccfc845ca2350075f6027e16c6206fc7b71716.tar.bz2 chat-23ccfc845ca2350075f6027e16c6206fc7b71716.zip |
Move remaining actions over to use redux and v4 endpoints (#6720)
Diffstat (limited to 'webapp/actions/diagnostics_actions.jsx')
-rw-r--r-- | webapp/actions/diagnostics_actions.jsx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/webapp/actions/diagnostics_actions.jsx b/webapp/actions/diagnostics_actions.jsx index 4ffdfa552..72cf387b4 100644 --- a/webapp/actions/diagnostics_actions.jsx +++ b/webapp/actions/diagnostics_actions.jsx @@ -1,8 +1,24 @@ // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import Client from 'client/web_client.jsx'; +import UserStore from 'stores/user_store.jsx'; -export function trackEvent(category, event, properties) { - Client.trackEvent(category, event, properties); +export function trackEvent(category, event, props) { + if (global.window && global.window.analytics) { + const properties = Object.assign({category, type: event, user_actual_id: UserStore.getCurrentId()}, props); + const options = { + context: { + ip: '0.0.0.0' + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '' + }, + anonymousId: '00000000000000000000000000' + }; + global.window.analytics.track('event', properties, options); + } } |