📈 Ajoute le suivi des bulles d'aide

pull/92/head
Laurent Bossavit 2017-10-13 11:25:56 +02:00
parent d4a3375d3a
commit 3511c6e165
1 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import {connect} from 'react-redux'
import {EXPLAIN_VARIABLE} from '../../actions'
import {rules, findRuleByDottedName} from 'Engine/rules'
import ReactPiwik from 'react-piwik';
@connect(state => ({explained: state.explainedVariable}), dispatch => ({
explain: variableName => dispatch({type: EXPLAIN_VARIABLE, variableName})
@ -40,7 +41,12 @@ export default class Explicable extends React.Component {
{ruleLabel}
<span
className="icon"
onClick={e => {e.preventDefault(); e.stopPropagation(); explain(dottedName)}}>
onClick={e => {
ReactPiwik.push(['trackEvent', 'help', dottedName]);
e.preventDefault();
e.stopPropagation();
explain(dottedName)
}}>
<i className="fa fa-info" aria-hidden="true"></i>
</span>
</span>