Skip to content

Commit

Permalink
tracking: Add Mixpanel event on Control clicks
Browse files Browse the repository at this point in the history
We'd like to gain some insight on how controls are used.
  • Loading branch information
dlespiau committed Sep 22, 2017
1 parent 60844e2 commit 802559e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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));
}
}
Expand Down

0 comments on commit 802559e

Please sign in to comment.