summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar.jsx
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-02-24 17:34:21 +0000
committerGitHub <noreply@github.com>2017-02-24 17:34:21 +0000
commit97cc0a0d73dcacfefcdff785c802762e2a0a60d6 (patch)
treec584bb28511980bde3bf09a6fffc1f8feacf9ddf /webapp/components/sidebar.jsx
parentf182d196fffc9da89ad63bdbd7bbb2e41da3146e (diff)
downloadchat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.tar.gz
chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.tar.bz2
chat-97cc0a0d73dcacfefcdff785c802762e2a0a60d6.zip
PLT-5071: Client side component of Telemetry. (#5516)
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r--webapp/components/sidebar.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 08962682d..048122897 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -21,6 +21,7 @@ import * as Utils from 'utils/utils.jsx';
import * as ChannelUtils from 'utils/channel_utils.jsx';
import * as ChannelActions from 'actions/channel_actions.jsx';
+import {trackEvent} from 'actions/diagnostics_actions.jsx';
import Constants from 'utils/constants.jsx';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
@@ -363,6 +364,7 @@ export default class Sidebar extends React.Component {
showMoreChannelsModal() {
this.setState({showMoreChannelsModal: true});
+ trackEvent('ui', 'ui_channels_more_public');
}
hideMoreChannelsModal() {
@@ -378,6 +380,7 @@ export default class Sidebar extends React.Component {
}
showMoreDirectChannelsModal() {
+ trackEvent('ui', 'ui_channels_more_direct');
this.setState({showDirectChannelsModal: true});
}
@@ -448,6 +451,7 @@ export default class Sidebar extends React.Component {
placement='right'
screens={screens}
overlayClass='tip-overlay--sidebar'
+ diagnosticsTag='tutorial_tip_2_channels'
/>
);
}
@@ -566,6 +570,7 @@ export default class Sidebar extends React.Component {
<Link
to={link}
className={rowClass}
+ onClick={this.trackChannelSelectedEvent}
>
{icon}
{channel.display_name}
@@ -577,6 +582,10 @@ export default class Sidebar extends React.Component {
);
}
+ trackChannelSelectedEvent() {
+ trackEvent('ui', 'ui_channel_selected');
+ }
+
render() {
// Check if we have all info needed to render
if (this.state.currentTeam == null || this.state.currentUser == null) {