chore: start tracking approvals in ReactGA (#2311)
* chore: start tracking approvals in ReactGA * move reactga to swap-only code
This commit is contained in:
parent
2bb695d84c
commit
115c72db9e
@ -215,8 +215,14 @@ export default function Swap({ history }: RouteComponentProps) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await approveCallback()
|
await approveCallback()
|
||||||
|
|
||||||
|
ReactGA.event({
|
||||||
|
category: 'Swap',
|
||||||
|
action: 'Approve',
|
||||||
|
label: [trade?.inputAmount.currency.symbol, toggledVersion].join('/'),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}, [approveCallback, gatherPermitSignature, signatureState])
|
}, [approveCallback, gatherPermitSignature, signatureState, toggledVersion, trade?.inputAmount.currency.symbol])
|
||||||
|
|
||||||
// check if user has gone through approval process, used to show two step buttons, reset on token change
|
// check if user has gone through approval process, used to show two step buttons, reset on token change
|
||||||
const [approvalSubmitted, setApprovalSubmitted] = useState<boolean>(false)
|
const [approvalSubmitted, setApprovalSubmitted] = useState<boolean>(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user