diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 12 | ||||
-rw-r--r-- | src/stores/PaymentStore.js | 3 | ||||
-rw-r--r-- | src/stores/RecipePreviewsStore.js | 8 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 14 | ||||
-rw-r--r-- | src/stores/UserStore.js | 13 |
5 files changed, 0 insertions, 50 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 2ac306a2a..be49d2453 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -17,7 +17,6 @@ import Request from './lib/Request'; | |||
17 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; | 17 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
18 | import { isMac } from '../environment'; | 18 | import { isMac } from '../environment'; |
19 | import locales from '../i18n/translations'; | 19 | import locales from '../i18n/translations'; |
20 | import { gaEvent, gaPage, statsEvent } from '../lib/analytics'; | ||
21 | import { onVisibilityChange } from '../helpers/visibility-helper'; | 20 | import { onVisibilityChange } from '../helpers/visibility-helper'; |
22 | import { getLocale } from '../helpers/i18n-helpers'; | 21 | import { getLocale } from '../helpers/i18n-helpers'; |
23 | 22 | ||
@@ -172,13 +171,6 @@ export default class AppStore extends Store { | |||
172 | 171 | ||
173 | debug('Window is visible/focused', isVisible); | 172 | debug('Window is visible/focused', isVisible); |
174 | }); | 173 | }); |
175 | |||
176 | // analytics autorun | ||
177 | reaction(() => this.stores.router.location.pathname, (pathname) => { | ||
178 | gaPage(pathname); | ||
179 | }); | ||
180 | |||
181 | statsEvent('app-start'); | ||
182 | } | 174 | } |
183 | 175 | ||
184 | @computed get cacheSize() { | 176 | @computed get cacheSize() { |
@@ -266,8 +258,6 @@ export default class AppStore extends Store { | |||
266 | } catch (err) { | 258 | } catch (err) { |
267 | console.warn(err); | 259 | console.warn(err); |
268 | } | 260 | } |
269 | |||
270 | gaEvent('App', enable ? 'enable autostart' : 'disable autostart'); | ||
271 | } | 261 | } |
272 | 262 | ||
273 | @action _openExternalUrl({ url }) { | 263 | @action _openExternalUrl({ url }) { |
@@ -277,8 +267,6 @@ export default class AppStore extends Store { | |||
277 | if (isValidExternalURL(url)) { | 267 | if (isValidExternalURL(url)) { |
278 | shell.openExternal(url); | 268 | shell.openExternal(url); |
279 | } | 269 | } |
280 | |||
281 | gaEvent('External URL', 'open', parsedUrl.host); | ||
282 | } | 270 | } |
283 | 271 | ||
284 | @action _checkForUpdates() { | 272 | @action _checkForUpdates() { |
diff --git a/src/stores/PaymentStore.js b/src/stores/PaymentStore.js index d4de476c8..8579812ad 100644 --- a/src/stores/PaymentStore.js +++ b/src/stores/PaymentStore.js | |||
@@ -3,7 +3,6 @@ import { action, observable, computed } from 'mobx'; | |||
3 | import Store from './lib/Store'; | 3 | import Store from './lib/Store'; |
4 | import CachedRequest from './lib/CachedRequest'; | 4 | import CachedRequest from './lib/CachedRequest'; |
5 | import Request from './lib/Request'; | 5 | import Request from './lib/Request'; |
6 | import { gaEvent } from '../lib/analytics'; | ||
7 | 6 | ||
8 | export default class PaymentStore extends Store { | 7 | export default class PaymentStore extends Store { |
9 | @observable plansRequest = new CachedRequest(this.api.payment, 'plans'); | 8 | @observable plansRequest = new CachedRequest(this.api.payment, 'plans'); |
@@ -26,8 +25,6 @@ export default class PaymentStore extends Store { | |||
26 | @action _createHostedPage({ planId }) { | 25 | @action _createHostedPage({ planId }) { |
27 | const request = this.createHostedPageRequest.execute(planId); | 26 | const request = this.createHostedPageRequest.execute(planId); |
28 | 27 | ||
29 | gaEvent('Payment', 'createHostedPage', planId); | ||
30 | |||
31 | return request; | 28 | return request; |
32 | } | 29 | } |
33 | } | 30 | } |
diff --git a/src/stores/RecipePreviewsStore.js b/src/stores/RecipePreviewsStore.js index 382820d58..a93aedfff 100644 --- a/src/stores/RecipePreviewsStore.js +++ b/src/stores/RecipePreviewsStore.js | |||
@@ -5,7 +5,6 @@ import ms from 'ms'; | |||
5 | import Store from './lib/Store'; | 5 | import Store from './lib/Store'; |
6 | import CachedRequest from './lib/CachedRequest'; | 6 | import CachedRequest from './lib/CachedRequest'; |
7 | import Request from './lib/Request'; | 7 | import Request from './lib/Request'; |
8 | import { gaEvent } from '../lib/analytics'; | ||
9 | 8 | ||
10 | export default class RecipePreviewsStore extends Store { | 9 | export default class RecipePreviewsStore extends Store { |
11 | @observable allRecipePreviewsRequest = new CachedRequest(this.api.recipePreviews, 'all'); | 10 | @observable allRecipePreviewsRequest = new CachedRequest(this.api.recipePreviews, 'all'); |
@@ -41,13 +40,6 @@ export default class RecipePreviewsStore extends Store { | |||
41 | @action _search({ needle }) { | 40 | @action _search({ needle }) { |
42 | if (needle !== '') { | 41 | if (needle !== '') { |
43 | this.searchRecipePreviewsRequest.execute(needle); | 42 | this.searchRecipePreviewsRequest.execute(needle); |
44 | |||
45 | this._analyticsSearch(needle); | ||
46 | } | 43 | } |
47 | } | 44 | } |
48 | |||
49 | // Helper | ||
50 | _analyticsSearch = debounce((needle) => { | ||
51 | gaEvent('Recipe', 'search', needle); | ||
52 | }, ms('3s')); | ||
53 | } | 45 | } |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 109ac5cd7..4d98df851 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -11,7 +11,6 @@ import Store from './lib/Store'; | |||
11 | import Request from './lib/Request'; | 11 | import Request from './lib/Request'; |
12 | import CachedRequest from './lib/CachedRequest'; | 12 | import CachedRequest from './lib/CachedRequest'; |
13 | import { matchRoute } from '../helpers/routing-helpers'; | 13 | import { matchRoute } from '../helpers/routing-helpers'; |
14 | import { gaEvent, statsEvent } from '../lib/analytics'; | ||
15 | import { workspaceStore } from '../features/workspaces'; | 14 | import { workspaceStore } from '../features/workspaces'; |
16 | 15 | ||
17 | const debug = require('debug')('Franz:ServiceStore'); | 16 | const debug = require('debug')('Franz:ServiceStore'); |
@@ -173,7 +172,6 @@ export default class ServicesStore extends Store { | |||
173 | 172 | ||
174 | if (redirect) { | 173 | if (redirect) { |
175 | this.stores.router.push('/settings/recipes'); | 174 | this.stores.router.push('/settings/recipes'); |
176 | gaEvent('Service', 'create', recipeId); | ||
177 | } | 175 | } |
178 | } | 176 | } |
179 | 177 | ||
@@ -250,7 +248,6 @@ export default class ServicesStore extends Store { | |||
250 | 248 | ||
251 | if (redirect) { | 249 | if (redirect) { |
252 | this.stores.router.push('/settings/services'); | 250 | this.stores.router.push('/settings/services'); |
253 | gaEvent('Service', 'update', service.recipe.id); | ||
254 | } | 251 | } |
255 | } | 252 | } |
256 | 253 | ||
@@ -269,15 +266,12 @@ export default class ServicesStore extends Store { | |||
269 | 266 | ||
270 | await request._promise; | 267 | await request._promise; |
271 | this.actionStatus = request.result.status; | 268 | this.actionStatus = request.result.status; |
272 | |||
273 | gaEvent('Service', 'delete', service.recipe.id); | ||
274 | } | 269 | } |
275 | 270 | ||
276 | @action async _clearCache({ serviceId }) { | 271 | @action async _clearCache({ serviceId }) { |
277 | this.clearCacheRequest.reset(); | 272 | this.clearCacheRequest.reset(); |
278 | const request = this.clearCacheRequest.execute(serviceId); | 273 | const request = this.clearCacheRequest.execute(serviceId); |
279 | await request._promise; | 274 | await request._promise; |
280 | gaEvent('Service', 'clear cache'); | ||
281 | } | 275 | } |
282 | 276 | ||
283 | @action _setActive({ serviceId, keepActiveRoute }) { | 277 | @action _setActive({ serviceId, keepActiveRoute }) { |
@@ -289,8 +283,6 @@ export default class ServicesStore extends Store { | |||
289 | }); | 283 | }); |
290 | service.isActive = true; | 284 | service.isActive = true; |
291 | 285 | ||
292 | statsEvent('activate-service', service.recipe.id); | ||
293 | |||
294 | this._focusActiveService(); | 286 | this._focusActiveService(); |
295 | } | 287 | } |
296 | 288 | ||
@@ -536,8 +528,6 @@ export default class ServicesStore extends Store { | |||
536 | service.order = services[s.id]; | 528 | service.order = services[s.id]; |
537 | }); | 529 | }); |
538 | }); | 530 | }); |
539 | |||
540 | this._reorderAnalytics(); | ||
541 | } | 531 | } |
542 | 532 | ||
543 | @action _toggleNotifications({ serviceId }) { | 533 | @action _toggleNotifications({ serviceId }) { |
@@ -710,10 +700,6 @@ export default class ServicesStore extends Store { | |||
710 | } | 700 | } |
711 | } | 701 | } |
712 | 702 | ||
713 | _reorderAnalytics = debounce(() => { | ||
714 | gaEvent('Service', 'order'); | ||
715 | }, ms('5s')); | ||
716 | |||
717 | _wrapIndex(index, delta, size) { | 703 | _wrapIndex(index, delta, size) { |
718 | return (((index + delta) % size) + size) % size; | 704 | return (((index + delta) % size) + size) % size; |
719 | } | 705 | } |
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js index b5423af3b..9e7951637 100644 --- a/src/stores/UserStore.js +++ b/src/stores/UserStore.js | |||
@@ -7,7 +7,6 @@ import { isDevMode } from '../environment'; | |||
7 | import Store from './lib/Store'; | 7 | import Store from './lib/Store'; |
8 | import Request from './lib/Request'; | 8 | import Request from './lib/Request'; |
9 | import CachedRequest from './lib/CachedRequest'; | 9 | import CachedRequest from './lib/CachedRequest'; |
10 | import { gaEvent } from '../lib/analytics'; | ||
11 | 10 | ||
12 | const debug = require('debug')('Franz:UserStore'); | 11 | const debug = require('debug')('Franz:UserStore'); |
13 | 12 | ||
@@ -156,16 +155,12 @@ export default class UserStore extends Store { | |||
156 | this._setUserData(authToken); | 155 | this._setUserData(authToken); |
157 | 156 | ||
158 | this.stores.router.push('/'); | 157 | this.stores.router.push('/'); |
159 | |||
160 | gaEvent('User', 'login'); | ||
161 | } | 158 | } |
162 | 159 | ||
163 | @action _tokenLogin(authToken) { | 160 | @action _tokenLogin(authToken) { |
164 | this._setUserData(authToken); | 161 | this._setUserData(authToken); |
165 | 162 | ||
166 | this.stores.router.push('/'); | 163 | this.stores.router.push('/'); |
167 | |||
168 | gaEvent('User', 'tokenLogin'); | ||
169 | } | 164 | } |
170 | 165 | ||
171 | @action async _signup({ | 166 | @action async _signup({ |
@@ -186,8 +181,6 @@ export default class UserStore extends Store { | |||
186 | this._setUserData(authToken); | 181 | this._setUserData(authToken); |
187 | 182 | ||
188 | this.stores.router.push(this.PRICING_ROUTE); | 183 | this.stores.router.push(this.PRICING_ROUTE); |
189 | |||
190 | gaEvent('User', 'signup'); | ||
191 | } | 184 | } |
192 | 185 | ||
193 | @action async _retrievePassword({ email }) { | 186 | @action async _retrievePassword({ email }) { |
@@ -195,8 +188,6 @@ export default class UserStore extends Store { | |||
195 | 188 | ||
196 | await request._promise; | 189 | await request._promise; |
197 | this.actionStatus = request.result.status || []; | 190 | this.actionStatus = request.result.status || []; |
198 | |||
199 | gaEvent('User', 'retrievePassword'); | ||
200 | } | 191 | } |
201 | 192 | ||
202 | @action async _invite({ invites }) { | 193 | @action async _invite({ invites }) { |
@@ -210,8 +201,6 @@ export default class UserStore extends Store { | |||
210 | if (this.stores.router.location.pathname.includes(this.INVITE_ROUTE)) { | 201 | if (this.stores.router.location.pathname.includes(this.INVITE_ROUTE)) { |
211 | this.stores.router.push('/'); | 202 | this.stores.router.push('/'); |
212 | } | 203 | } |
213 | |||
214 | gaEvent('User', 'inviteUsers'); | ||
215 | } | 204 | } |
216 | 205 | ||
217 | @action async _update({ userData }) { | 206 | @action async _update({ userData }) { |
@@ -221,8 +210,6 @@ export default class UserStore extends Store { | |||
221 | 210 | ||
222 | this.getUserInfoRequest.patch(() => response.data); | 211 | this.getUserInfoRequest.patch(() => response.data); |
223 | this.actionStatus = response.status || []; | 212 | this.actionStatus = response.status || []; |
224 | |||
225 | gaEvent('User', 'update'); | ||
226 | } | 213 | } |
227 | 214 | ||
228 | @action _resetStatus() { | 215 | @action _resetStatus() { |