diff options
author | George Goldberg <george@gberg.me> | 2017-02-24 17:34:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-24 17:34:21 +0000 |
commit | 97cc0a0d73dcacfefcdff785c802762e2a0a60d6 (patch) | |
tree | c584bb28511980bde3bf09a6fffc1f8feacf9ddf /webapp/actions/channel_actions.jsx | |
parent | f182d196fffc9da89ad63bdbd7bbb2e41da3146e (diff) | |
download | chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.tar.gz chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.tar.bz2 chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.zip |
PLT-5071: Client side component of Telemetry. (#5516)
Diffstat (limited to 'webapp/actions/channel_actions.jsx')
-rw-r--r-- | webapp/actions/channel_actions.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx index 08d8f1486..3528b4480 100644 --- a/webapp/actions/channel_actions.jsx +++ b/webapp/actions/channel_actions.jsx @@ -10,6 +10,7 @@ import * as ChannelUtils from 'utils/channel_utils.jsx'; import PreferenceStore from 'stores/preference_store.jsx'; import {loadProfilesAndTeamMembersForDMSidebar} from 'actions/user_actions.jsx'; +import {trackEvent} from 'actions/diagnostics_actions.jsx'; import Client from 'client/web_client.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; @@ -171,6 +172,7 @@ export function openDirectChannelToUser(user, success, error) { const channel = ChannelStore.getByName(channelName); if (channel) { + trackEvent('api', 'api_channels_join_direct'); PreferenceStore.setPreference(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, user.id, 'true'); loadProfilesAndTeamMembersForDMSidebar(); @@ -224,10 +226,12 @@ export function openDirectChannelToUser(user, success, error) { } export function markFavorite(channelId) { + trackEvent('api', 'api_channels_favorited'); AsyncClient.savePreference(Preferences.CATEGORY_FAVORITE_CHANNEL, channelId, 'true'); } export function unmarkFavorite(channelId) { + trackEvent('api', 'api_channels_unfavorited'); const pref = { user_id: UserStore.getCurrentId(), category: Preferences.CATEGORY_FAVORITE_CHANNEL, |