Skip to content

feat/bitpay-tracking: added events to track bitpay usage #6460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ export enum MiscEvents {
CUSTOMER_SUPPORT_CLICKED = 'Customer Support Clicked',
SIGNUP_VIEWED = 'Signup Viewed',
WRONG_CHANGE_CACHE = 'Wrong Change Cache',
WRONG_RECEIVE_CACHE = 'Wrong Receive Cache'
WRONG_RECEIVE_CACHE = 'Wrong Receive Cache',
BITPAY_LINK = 'Bitpay Deeplink detected',
BITPAY_INVOICE_VALID = 'Bitpay invoice'
}

export type MiscActions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
title: C.BITPAY_CONFIRM_TITLE
})
)
yield put(
actions.analytics.trackEvent({
key: Analytics.BITPAY_INVOICE_VALID,
properties: {
coin: 'BCH'
}
})
)

const { canceled } = yield race({
canceled: take(actions.modals.closeModal.type),
response: take(actionTypes.wallet.SUBMIT_CONFIRMATION)
Expand All @@ -116,6 +125,7 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
name: 'paymentProtocol'
})
)

return yield put(actions.goals.runGoals())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
title: C.BITPAY_CONFIRM_TITLE
})
)
yield put(
actions.analytics.trackEvent({
key: Analytics.BITPAY_INVOICE_VALID,
properties: {
coin: 'BTC'
}
})
)
const { canceled } = yield race({
canceled: take(actions.modals.closeModal.type),
response: take(actionTypes.wallet.SUBMIT_CONFIRMATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { parsePaymentRequest } from 'data/bitpay/sagas'
import { NftOrderStepEnum } from 'data/components/nfts/types'
import { ModalName } from 'data/modals/types'
import profileSagas from 'data/modules/profile/sagas'
import { ProductEligibilityForUser, SofiUserMigrationStatus } from 'data/types'
import { Analytics, ProductEligibilityForUser, SofiUserMigrationStatus } from 'data/types'
import * as C from 'services/alerts'

import { WAIT_FOR_INTEREST_PROMO_MODAL } from './model'
Expand Down Expand Up @@ -224,6 +224,14 @@ export default ({ api, coreSagas, networks }) => {
yield put(actions.goals.saveGoal({ data, name: 'paymentProtocol' }))
yield put(actions.router.push('/wallet'))
yield put(actions.alerts.displayInfo(C.PLEASE_LOGIN))
yield put(
actions.analytics.trackEvent({
key: Analytics.BITPAY_LINK,
properties: {
coin: isBchPayPro ? 'BCH' : 'BTC'
}
})
)
} else {
// BTC payments
const { address } = bip21Payload
Expand Down
Loading