|
|
|
@ -141,18 +141,8 @@ const PlanItem: FC<Props> = ({
|
|
|
|
setLoading(true)
|
|
|
|
setLoading(true)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const res = await fetchSubscriptionUrls(plan, isYear ? 'year' : 'month')
|
|
|
|
const res = await fetchSubscriptionUrls(plan, isYear ? 'year' : 'month')
|
|
|
|
if ((window as any).gtag) {
|
|
|
|
// Adb Block additional tracking block the gtag, so we need to redirect directly
|
|
|
|
(window as any).gtag('event', 'click_pay_btn', {
|
|
|
|
window.location.href = res.url
|
|
|
|
plan,
|
|
|
|
|
|
|
|
interval: isYear ? 'year' : 'month',
|
|
|
|
|
|
|
|
event_callback: () => {
|
|
|
|
|
|
|
|
window.location.href = res.url
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
window.location.href = res.url
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally {
|
|
|
|
finally {
|
|
|
|
setLoading(false)
|
|
|
|
setLoading(false)
|
|
|
|
|