summaryrefslogtreecommitdiffstats
path: root/webapp/components/user_settings
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/user_settings
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/user_settings')
-rw-r--r--webapp/components/user_settings/user_settings_general.jsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index d79507511..f9c624aa0 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -16,6 +16,7 @@ import * as Utils from 'utils/utils.jsx';
import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedHTMLMessage, FormattedDate} from 'react-intl';
import {updateUser, uploadProfileImage} from 'actions/user_actions.jsx';
+import {trackEvent} from 'actions/diagnostics_actions.jsx';
const holders = defineMessages({
usernameReserved: {
@@ -127,6 +128,8 @@ class UserSettingsGeneralTab extends React.Component {
user.username = username;
+ trackEvent('settings', 'user_settings_update', {field: 'username'});
+
this.submitUser(user, Constants.UserUpdateEvents.USERNAME, false);
}
@@ -143,6 +146,8 @@ class UserSettingsGeneralTab extends React.Component {
user.nickname = nickname;
+ trackEvent('settings', 'user_settings_update', {field: 'username'});
+
this.submitUser(user, Constants.UserUpdateEvents.NICKNAME, false);
}
@@ -161,6 +166,8 @@ class UserSettingsGeneralTab extends React.Component {
user.first_name = firstName;
user.last_name = lastName;
+ trackEvent('settings', 'user_settings_update', {field: 'fullname'});
+
this.submitUser(user, Constants.UserUpdateEvents.FULLNAME, false);
}
@@ -189,6 +196,7 @@ class UserSettingsGeneralTab extends React.Component {
}
user.email = email;
+ trackEvent('settings', 'user_settings_update', {field: 'email'});
this.submitUser(user, Constants.UserUpdateEvents.EMAIL, true);
}
@@ -228,6 +236,8 @@ class UserSettingsGeneralTab extends React.Component {
return;
}
+ trackEvent('settings', 'user_settings_update', {field: 'picture'});
+
const {formatMessage} = this.props.intl;
const picture = this.state.picture;
@@ -268,6 +278,8 @@ class UserSettingsGeneralTab extends React.Component {
user.position = position;
+ trackEvent('settings', 'user_settings_update', {field: 'position'});
+
this.submitUser(user, Constants.UserUpdateEvents.Position, false);
}