From a164ecbdc849e86e9453633bc640dcb6fe75a688 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Tue, 22 Oct 2019 10:12:55 +0200 Subject: refine analytics events --- src/features/planSelection/components/PlanSelection.js | 5 +++++ src/features/planSelection/containers/PlanSelectionScreen.js | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/features') diff --git a/src/features/planSelection/components/PlanSelection.js b/src/features/planSelection/components/PlanSelection.js index 355187516..aff6bf94f 100644 --- a/src/features/planSelection/components/PlanSelection.js +++ b/src/features/planSelection/components/PlanSelection.js @@ -12,6 +12,7 @@ import { i18nPlanName } from '../../../helpers/plan-helpers'; import { PLANS } from '../../../config'; import { FeatureList } from '../../../components/ui/FeatureList'; import Appear from '../../../components/ui/effects/Appear'; +import { gaPage } from '../../../lib/analytics'; const messages = defineMessages({ welcome: { @@ -163,6 +164,10 @@ class PlanSelection extends Component { intl: intlShape, }; + componentDidMount() { + gaPage('/select-plan'); + } + render() { const { classes, diff --git a/src/features/planSelection/containers/PlanSelectionScreen.js b/src/features/planSelection/containers/PlanSelectionScreen.js index 6e8cdbf47..3f9638e9d 100644 --- a/src/features/planSelection/containers/PlanSelectionScreen.js +++ b/src/features/planSelection/containers/PlanSelectionScreen.js @@ -9,7 +9,7 @@ import UserStore from '../../../stores/UserStore'; import PlanSelection from '../components/PlanSelection'; import ErrorBoundary from '../../../components/util/ErrorBoundary'; import { planSelectionStore, GA_CATEGORY_PLAN_SELECTION } from '..'; -import { gaEvent } from '../../../lib/analytics'; +import { gaEvent, gaPage } from '../../../lib/analytics'; const { dialog, app } = remote; @@ -80,6 +80,8 @@ class PlanSelectionScreen extends Component { } }} stayOnFree={() => { + gaPage('/select-plan/downgrade'); + const selection = dialog.showMessageBoxSync(app.mainWindow, { type: 'question', message: intl.formatMessage(messages.dialogTitle), @@ -101,7 +103,7 @@ class PlanSelectionScreen extends Component { } else { this.upgradeAccount(plans.personal.yearly.id); - gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', 'Revoke'); + gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', 'Downgrade'); } }} subscriptionExpired={user.team && user.team.state === 'expired' && !user.team.userHasDowngraded} -- cgit v1.2.3-70-g09d2