mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 09:41:57 +00:00
Merge pull request #2857 from weaveworks/2017-09-21-control-tracking
tracking: Add Mixpanel event on Control clicks
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { trackMixpanelEvent } from '../../utils/tracking-utils';
|
||||
import { doControl } from '../../actions/app-actions';
|
||||
|
||||
class NodeDetailsControlButton extends React.Component {
|
||||
@@ -21,6 +22,8 @@ class NodeDetailsControlButton extends React.Component {
|
||||
|
||||
handleClick(ev) {
|
||||
ev.preventDefault();
|
||||
const { id, human } = this.props.control;
|
||||
trackMixpanelEvent('scope.node.control.click', { id, title: human });
|
||||
this.props.dispatch(doControl(this.props.nodeId, this.props.control));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user