Commit 8eaf1f49 authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

feat(analytics): add a GA event on risk block (#3768)

* feat(analytics): add a GA event on risk block

* Update src/hooks/useAccountRiskCheck.ts
Co-authored-by: default avatarWill Hennessy <hennessywill@gmail.com>
Co-authored-by: default avatarWill Hennessy <hennessywill@gmail.com>
parent f717bf4a
import { useEffect } from 'react' import { useEffect } from 'react'
import ReactGA from 'react-ga4'
import { ApplicationModal, setOpenModal } from 'state/application/reducer' import { ApplicationModal, setOpenModal } from 'state/application/reducer'
import { useAppDispatch } from 'state/hooks' import { useAppDispatch } from 'state/hooks'
...@@ -17,6 +18,11 @@ export default function useAccountRiskCheck(account: string | null | undefined) ...@@ -17,6 +18,11 @@ export default function useAccountRiskCheck(account: string | null | undefined)
.then((data) => { .then((data) => {
if (data.block) { if (data.block) {
dispatch(setOpenModal(ApplicationModal.BLOCKED_ACCOUNT)) dispatch(setOpenModal(ApplicationModal.BLOCKED_ACCOUNT))
ReactGA.event({
category: 'Address Screening',
action: 'blocked',
label: account,
})
} }
}) })
.catch(() => { .catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment