aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-10-22 10:12:55 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-10-22 10:12:55 +0200
commita164ecbdc849e86e9453633bc640dcb6fe75a688 (patch)
treed038298e333b03d26d6ef84ef89f8aa79e17253d /src
parentdon't show plan selection when user is premium (edge case) (diff)
downloadferdium-app-a164ecbdc849e86e9453633bc640dcb6fe75a688.tar.gz
ferdium-app-a164ecbdc849e86e9453633bc640dcb6fe75a688.tar.zst
ferdium-app-a164ecbdc849e86e9453633bc640dcb6fe75a688.zip
refine analytics events
Diffstat (limited to 'src')
-rw-r--r--src/features/planSelection/components/PlanSelection.js5
-rw-r--r--src/features/planSelection/containers/PlanSelectionScreen.js6
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';
12import { PLANS } from '../../../config'; 12import { PLANS } from '../../../config';
13import { FeatureList } from '../../../components/ui/FeatureList'; 13import { FeatureList } from '../../../components/ui/FeatureList';
14import Appear from '../../../components/ui/effects/Appear'; 14import Appear from '../../../components/ui/effects/Appear';
15import { gaPage } from '../../../lib/analytics';
15 16
16const messages = defineMessages({ 17const 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';
9import PlanSelection from '../components/PlanSelection'; 9import PlanSelection from '../components/PlanSelection';
10import ErrorBoundary from '../../../components/util/ErrorBoundary'; 10import ErrorBoundary from '../../../components/util/ErrorBoundary';
11import { planSelectionStore, GA_CATEGORY_PLAN_SELECTION } from '..'; 11import { planSelectionStore, GA_CATEGORY_PLAN_SELECTION } from '..';
12import { gaEvent } from '../../../lib/analytics'; 12import { gaEvent, gaPage } from '../../../lib/analytics';
13 13
14const { dialog, app } = remote; 14const { 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}