From 7971227445e644b536f94208f43881fcd07bcb05 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Mon, 7 Jan 2019 22:25:05 +0100 Subject: Add analytics events for app delay --- src/features/delayApp/Component.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/features/delayApp/Component.js') diff --git a/src/features/delayApp/Component.js b/src/features/delayApp/Component.js index 6e0532c9a..ff84510e8 100644 --- a/src/features/delayApp/Component.js +++ b/src/features/delayApp/Component.js @@ -4,6 +4,8 @@ import { inject, observer } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; import injectSheet from 'react-jss'; +import { gaEvent } from '../../lib/analytics'; + import Button from '../../components/ui/Button'; import { config } from '.'; @@ -59,8 +61,16 @@ export default @inject('actions') @injectSheet(styles) @observer class DelayApp clearInterval(this.countdownInterval); } + handleCTAClick() { + const { actions } = this.props; + + actions.ui.openSettings({ path: 'user' }); + + gaEvent('DelayApp', 'subscribe_click', 'Delay App Feature'); + } + render() { - const { classes, actions } = this.props; + const { classes } = this.props; const { intl } = this.context; return ( @@ -70,7 +80,7 @@ export default @inject('actions') @injectSheet(styles) @observer class DelayApp label={intl.formatMessage(messages.action)} className={classes.button} buttonType="inverted" - onClick={() => actions.ui.openSettings({ path: 'user' })} + onClick={this.handleCTAClick.bind(this)} />

{intl.formatMessage(messages.text, { -- cgit v1.2.3-70-g09d2