diff options
Diffstat (limited to 'src/features/shareFranz')
-rw-r--r-- | src/features/shareFranz/Component.js | 14 | ||||
-rw-r--r-- | src/features/shareFranz/index.js | 14 |
2 files changed, 7 insertions, 21 deletions
diff --git a/src/features/shareFranz/Component.js b/src/features/shareFranz/Component.js index a33315e17..405fb0ab5 100644 --- a/src/features/shareFranz/Component.js +++ b/src/features/shareFranz/Component.js | |||
@@ -11,17 +11,16 @@ import { | |||
11 | } from '@mdi/js'; | 11 | } from '@mdi/js'; |
12 | import Modal from '../../components/ui/Modal'; | 12 | import Modal from '../../components/ui/Modal'; |
13 | import { state } from '.'; | 13 | import { state } from '.'; |
14 | import { gaEvent } from '../../lib/analytics'; | ||
15 | import ServicesStore from '../../stores/ServicesStore'; | 14 | import ServicesStore from '../../stores/ServicesStore'; |
16 | 15 | ||
17 | const messages = defineMessages({ | 16 | const messages = defineMessages({ |
18 | headline: { | 17 | headline: { |
19 | id: 'feature.shareFranz.headline', | 18 | id: 'feature.shareFranz.headline', |
20 | defaultMessage: '!!!Franz is better together!', | 19 | defaultMessage: '!!!Ferdi is better together!', |
21 | }, | 20 | }, |
22 | text: { | 21 | text: { |
23 | id: 'feature.shareFranz.text', | 22 | id: 'feature.shareFranz.text', |
24 | defaultMessage: '!!!Tell your friends and colleagues how awesome Franz is and help us to spread the word.', | 23 | defaultMessage: '!!!Tell your friends and colleagues how awesome Ferdi is and help us to spread the word.', |
25 | }, | 24 | }, |
26 | actionsEmail: { | 25 | actionsEmail: { |
27 | id: 'feature.shareFranz.action.email', | 26 | id: 'feature.shareFranz.action.email', |
@@ -132,9 +131,6 @@ export default @injectSheet(styles) @inject('stores') @observer class ShareFranz | |||
132 | icon={mdiEmail} | 131 | icon={mdiEmail} |
133 | href={`mailto:?subject=Meet the cool app Franz&body=${intl.formatMessage(messages.shareTextEmail, { count: serviceCount })}}`} | 132 | href={`mailto:?subject=Meet the cool app Franz&body=${intl.formatMessage(messages.shareTextEmail, { count: serviceCount })}}`} |
134 | target="_blank" | 133 | target="_blank" |
135 | onClick={() => { | ||
136 | gaEvent('Share Franz', 'share', 'Share via email'); | ||
137 | }} | ||
138 | /> | 134 | /> |
139 | <Button | 135 | <Button |
140 | label={intl.formatMessage(messages.actionsFacebook)} | 136 | label={intl.formatMessage(messages.actionsFacebook)} |
@@ -142,9 +138,6 @@ export default @injectSheet(styles) @inject('stores') @observer class ShareFranz | |||
142 | icon={mdiFacebookBox} | 138 | icon={mdiFacebookBox} |
143 | href="https://www.facebook.com/sharer/sharer.php?u=https://www.meetfranz.com?utm_source=facebook&utm_medium=referral&utm_campaign=share-button" | 139 | href="https://www.facebook.com/sharer/sharer.php?u=https://www.meetfranz.com?utm_source=facebook&utm_medium=referral&utm_campaign=share-button" |
144 | target="_blank" | 140 | target="_blank" |
145 | onClick={() => { | ||
146 | gaEvent('Share Franz', 'share', 'Share via Facebook'); | ||
147 | }} | ||
148 | /> | 141 | /> |
149 | <Button | 142 | <Button |
150 | label={intl.formatMessage(messages.actionsTwitter)} | 143 | label={intl.formatMessage(messages.actionsTwitter)} |
@@ -152,9 +145,6 @@ export default @injectSheet(styles) @inject('stores') @observer class ShareFranz | |||
152 | icon={mdiTwitter} | 145 | icon={mdiTwitter} |
153 | href={`http://twitter.com/intent/tweet?status=${intl.formatMessage(messages.shareTextTwitter, { count: serviceCount })}`} | 146 | href={`http://twitter.com/intent/tweet?status=${intl.formatMessage(messages.shareTextTwitter, { count: serviceCount })}`} |
154 | target="_blank" | 147 | target="_blank" |
155 | onClick={() => { | ||
156 | gaEvent('Share Franz', 'share', 'Share via Twitter'); | ||
157 | }} | ||
158 | /> | 148 | /> |
159 | </div> | 149 | </div> |
160 | </Modal> | 150 | </Modal> |
diff --git a/src/features/shareFranz/index.js b/src/features/shareFranz/index.js index 87deacef4..217e926f9 100644 --- a/src/features/shareFranz/index.js +++ b/src/features/shareFranz/index.js | |||
@@ -2,11 +2,10 @@ import { observable, reaction } from 'mobx'; | |||
2 | import ms from 'ms'; | 2 | import ms from 'ms'; |
3 | 3 | ||
4 | import { state as delayAppState } from '../delayApp'; | 4 | import { state as delayAppState } from '../delayApp'; |
5 | import { gaEvent, gaPage } from '../../lib/analytics'; | ||
6 | 5 | ||
7 | export { default as Component } from './Component'; | 6 | export { default as Component } from './Component'; |
8 | 7 | ||
9 | const debug = require('debug')('Franz:feature:shareFranz'); | 8 | const debug = require('debug')('Ferdi:feature:shareFranz'); |
10 | 9 | ||
11 | const defaultState = { | 10 | const defaultState = { |
12 | isModalVisible: false, | 11 | isModalVisible: false, |
@@ -16,19 +15,16 @@ const defaultState = { | |||
16 | export const state = observable(defaultState); | 15 | export const state = observable(defaultState); |
17 | 16 | ||
18 | export default function initialize(stores) { | 17 | export default function initialize(stores) { |
19 | debug('Initialize shareFranz feature'); | 18 | debug('Initialize shareFerdi feature'); |
20 | 19 | ||
21 | window.franz.features.shareFranz = { | 20 | window.ferdi.features.shareFerdi = { |
22 | state, | 21 | state, |
23 | }; | 22 | }; |
24 | 23 | ||
25 | function showModal() { | 24 | function showModal() { |
26 | debug('Showing share window'); | 25 | debug('Would have showed share window'); |
27 | 26 | ||
28 | state.isModalVisible = true; | 27 | // state.isModalVisible = true; |
29 | |||
30 | gaEvent('Share Franz', 'show'); | ||
31 | gaPage('/share-modal'); | ||
32 | } | 28 | } |
33 | 29 | ||
34 | reaction( | 30 | reaction( |