Commit 115c72db authored by Justin Domingue's avatar Justin Domingue Committed by GitHub

chore: start tracking approvals in ReactGA (#2311)

* chore: start tracking approvals in ReactGA

* move reactga to swap-only code
parent 2bb695d8
......@@ -215,8 +215,14 @@ export default function Swap({ history }: RouteComponentProps) {
}
} else {
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
const [approvalSubmitted, setApprovalSubmitted] = useState<boolean>(false)
......
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