diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-10-22 10:12:55 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-10-22 10:12:55 +0200 |
commit | a164ecbdc849e86e9453633bc640dcb6fe75a688 (patch) | |
tree | d038298e333b03d26d6ef84ef89f8aa79e17253d | |
parent | don't show plan selection when user is premium (edge case) (diff) | |
download | ferdium-app-a164ecbdc849e86e9453633bc640dcb6fe75a688.tar.gz ferdium-app-a164ecbdc849e86e9453633bc640dcb6fe75a688.tar.zst ferdium-app-a164ecbdc849e86e9453633bc640dcb6fe75a688.zip |
refine analytics events
-rw-r--r-- | src/features/planSelection/components/PlanSelection.js | 5 | ||||
-rw-r--r-- | src/features/planSelection/containers/PlanSelectionScreen.js | 6 |
2 files changed, 9 insertions, 2 deletions
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'; | |||
12 | import { PLANS } from '../../../config'; | 12 | import { PLANS } from '../../../config'; |
13 | import { FeatureList } from '../../../components/ui/FeatureList'; | 13 | import { FeatureList } from '../../../components/ui/FeatureList'; |
14 | import Appear from '../../../components/ui/effects/Appear'; | 14 | import Appear from '../../../components/ui/effects/Appear'; |
15 | import { gaPage } from '../../../lib/analytics'; | ||
15 | 16 | ||
16 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
17 | welcome: { | 18 | welcome: { |
@@ -163,6 +164,10 @@ class PlanSelection extends Component { | |||
163 | intl: intlShape, | 164 | intl: intlShape, |
164 | }; | 165 | }; |
165 | 166 | ||
167 | componentDidMount() { | ||
168 | gaPage('/select-plan'); | ||
169 | } | ||
170 | |||
166 | render() { | 171 | render() { |
167 | const { | 172 | const { |
168 | classes, | 173 | 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'; | |||
9 | import PlanSelection from '../components/PlanSelection'; | 9 | import PlanSelection from '../components/PlanSelection'; |
10 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | 10 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; |
11 | import { planSelectionStore, GA_CATEGORY_PLAN_SELECTION } from '..'; | 11 | import { planSelectionStore, GA_CATEGORY_PLAN_SELECTION } from '..'; |
12 | import { gaEvent } from '../../../lib/analytics'; | 12 | import { gaEvent, gaPage } from '../../../lib/analytics'; |
13 | 13 | ||
14 | const { dialog, app } = remote; | 14 | const { dialog, app } = remote; |
15 | 15 | ||
@@ -80,6 +80,8 @@ class PlanSelectionScreen extends Component { | |||
80 | } | 80 | } |
81 | }} | 81 | }} |
82 | stayOnFree={() => { | 82 | stayOnFree={() => { |
83 | gaPage('/select-plan/downgrade'); | ||
84 | |||
83 | const selection = dialog.showMessageBoxSync(app.mainWindow, { | 85 | const selection = dialog.showMessageBoxSync(app.mainWindow, { |
84 | type: 'question', | 86 | type: 'question', |
85 | message: intl.formatMessage(messages.dialogTitle), | 87 | message: intl.formatMessage(messages.dialogTitle), |
@@ -101,7 +103,7 @@ class PlanSelectionScreen extends Component { | |||
101 | } else { | 103 | } else { |
102 | this.upgradeAccount(plans.personal.yearly.id); | 104 | this.upgradeAccount(plans.personal.yearly.id); |
103 | 105 | ||
104 | gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', 'Revoke'); | 106 | gaEvent(GA_CATEGORY_PLAN_SELECTION, 'SelectPlan', 'Downgrade'); |
105 | } | 107 | } |
106 | }} | 108 | }} |
107 | subscriptionExpired={user.team && user.team.state === 'expired' && !user.team.userHasDowngraded} | 109 | subscriptionExpired={user.team && user.team.state === 'expired' && !user.team.userHasDowngraded} |