From 3511c6e165544e067c9466ca86cbe288ff26e1db Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Fri, 13 Oct 2017 11:25:56 +0200 Subject: [PATCH] :chart_with_upwards_trend: Ajoute le suivi des bulles d'aide --- source/components/conversation/Explicable.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/components/conversation/Explicable.js b/source/components/conversation/Explicable.js index 1730bd3d3..06ae59005 100644 --- a/source/components/conversation/Explicable.js +++ b/source/components/conversation/Explicable.js @@ -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} {e.preventDefault(); e.stopPropagation(); explain(dottedName)}}> + onClick={e => { + ReactPiwik.push(['trackEvent', 'help', dottedName]); + e.preventDefault(); + e.stopPropagation(); + explain(dottedName) + }}>