From 802559e5277858bb33add1f7c9b6ab7afbf1c9c0 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Thu, 21 Sep 2017 11:27:32 +0100 Subject: [PATCH] tracking: Add Mixpanel event on Control clicks We'd like to gain some insight on how controls are used. --- .../components/node-details/node-details-control-button.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/app/scripts/components/node-details/node-details-control-button.js b/client/app/scripts/components/node-details/node-details-control-button.js index 6e8f1df28f..f1d1f83baf 100644 --- a/client/app/scripts/components/node-details/node-details-control-button.js +++ b/client/app/scripts/components/node-details/node-details-control-button.js @@ -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)); } }