Browse Source

integrate tracking of pages and some events in the receive flow

master
Anastasia Poupeney 7 years ago
parent
commit
f7c500c7c2
  1. 2
      src/components/modals/Receive/steps/01-step-account.js
  2. 3
      src/components/modals/Receive/steps/02-step-connect-device.js
  3. 8
      src/components/modals/Receive/steps/03-step-confirm-address.js
  4. 2
      src/components/modals/Receive/steps/04-step-receive-funds.js

2
src/components/modals/Receive/steps/01-step-account.js

@ -13,7 +13,7 @@ import type { StepProps } from '../index'
export default function StepAccount({ t, account, onChangeAccount }: StepProps) { export default function StepAccount({ t, account, onChangeAccount }: StepProps) {
return ( return (
<Box flow={1}> <Box flow={1}>
<TrackPage category="Receive" name="Step1" /> <TrackPage category="Receive Flow" name="Step 1" />
<Label>{t('app:receive.steps.chooseAccount.label')}</Label> <Label>{t('app:receive.steps.chooseAccount.label')}</Label>
<SelectAccount autoFocus onChange={onChangeAccount} value={account} /> <SelectAccount autoFocus onChange={onChangeAccount} value={account} />
</Box> </Box>

3
src/components/modals/Receive/steps/02-step-connect-device.js

@ -5,6 +5,7 @@ import React from 'react'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import Button from 'components/base/Button' import Button from 'components/base/Button'
import EnsureDeviceApp from 'components/EnsureDeviceApp' import EnsureDeviceApp from 'components/EnsureDeviceApp'
import TrackPage from 'analytics/TrackPage'
import type { StepProps } from '../index' import type { StepProps } from '../index'
@ -26,7 +27,9 @@ export function StepConnectDeviceFooter({
}: StepProps) { }: StepProps) {
return ( return (
<Box horizontal flow={2}> <Box horizontal flow={2}>
<TrackPage category="Receive Flow" name="Step 2" />
<Button <Button
event="Receive Flow Without Device Clicked"
onClick={() => { onClick={() => {
onSkipConfirm() onSkipConfirm()
transitionTo('receive') transitionTo('receive')

8
src/components/modals/Receive/steps/03-step-confirm-address.js

@ -18,9 +18,10 @@ export default class StepConfirmAddress extends PureComponent<StepProps> {
invariant(device, 'No device given') invariant(device, 'No device given')
return ( return (
<Container> <Container>
<TrackPage category="Receive" name="Step3" /> <TrackPage category="Receive Flow" name="Step 3" />
{isAddressVerified === false ? ( {isAddressVerified === false ? (
<Fragment> <Fragment>
<TrackPage category="Receive Flow" name="Step 3 Address Not Verified Error" />
<Title> <Title>
<TranslatedError error={verifyAddressError} /> <TranslatedError error={verifyAddressError} />
</Title> </Title>
@ -50,10 +51,13 @@ export function StepConfirmAddressFooter({ t, transitionTo, onRetry }: StepProps
// This will be displayed only if user rejected address // This will be displayed only if user rejected address
return ( return (
<Fragment> <Fragment>
<Button>{t('app:receive.steps.confirmAddress.support')}</Button> <Button event="Receive Flow Step 3 Contact Us Clicked">
{t('app:receive.steps.confirmAddress.support')}
</Button>
<Button <Button
ml={2} ml={2}
primary primary
event="Receive Flow Step 3 Retry Clicked"
onClick={() => { onClick={() => {
onRetry() onRetry()
transitionTo('device') transitionTo('device')

2
src/components/modals/Receive/steps/04-step-receive-funds.js

@ -59,7 +59,7 @@ export default class StepReceiveFunds extends PureComponent<StepProps> {
invariant(account, 'No account given') invariant(account, 'No account given')
return ( return (
<Box flow={5}> <Box flow={5}>
<TrackPage category="Receive" name="Step4" /> <TrackPage category="Receive Flow" name="Step 4" />
<CurrentAddressForAccount <CurrentAddressForAccount
account={account} account={account}
isAddressVerified={isAddressVerified} isAddressVerified={isAddressVerified}

Loading…
Cancel
Save