Merge pull request #1403 from matrix-org/luke/track-action-buttons

Track action button click event
pull/21833/head
Luke Barnard 2017-09-20 17:53:11 +01:00 committed by GitHub
commit a0c5bbb3eb
1 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import PropTypes from 'prop-types';
import AccessibleButton from './AccessibleButton';
import dis from '../../../dispatcher';
import sdk from '../../../index';
import Analytics from '../../../Analytics';
export default React.createClass({
displayName: 'RoleButton',
@ -47,6 +48,7 @@ export default React.createClass({
_onClick: function(ev) {
ev.stopPropagation();
Analytics.trackEvent('Action Button', 'click', this.props.action);
dis.dispatch({action: this.props.action});
},