From 7d3fc77d91fe573194ba7a51309bf798b1156c28 Mon Sep 17 00:00:00 2001 From: Gavin Lazar Suntop Date: Mon, 26 Feb 2018 13:39:41 -0800 Subject: [PATCH] adding tracking to share button - closes #1066 --- source/js/components/petition/petition.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/js/components/petition/petition.jsx b/source/js/components/petition/petition.jsx index b2db86b34ce..154ddce6671 100644 --- a/source/js/components/petition/petition.jsx +++ b/source/js/components/petition/petition.jsx @@ -63,6 +63,14 @@ export default class Petition extends React.Component { }); } + onShareBtnClick() { + ReactGA.event({ + category: `petition`, + action: `share tap`, + label: `${document.title} - share tap` + }); + } + // helper function for auto-generating checkboxes off of the passed props. generateCheckboxes(disabled) { return [`checkbox1`, `checkbox2`].map(name => { @@ -295,7 +303,7 @@ export default class Petition extends React.Component { return (

{this.props.thankYou}

- {this.props.shareText} + {this.props.shareText}
); }