#Branko

1 messages · Page 1 of 1 (latest)

signal gardenBOT
forest mauve
lapis wasp
#

I would like to fire google analytics event after successful payment, can I do that on the client side?

forest mauve
lapis wasp
#

ok so let me clarify the issue, I am aware that its probably confusing.

after stripe.confirmPayment method I would like to fire google analytics code, since stripe is doing hard reload on successful payment I dont see any viable options for that on client side.

forest mauve
#

In the codesnippet, you shared above you set a comment // not reached , that mean your app is stuck in stripe.confirmPayment call or what is the issue ?

lapis wasp
#

its not stuck, after successful payment nothing below .confirmPayment method is reached

#

hard realod is done instead to the redirect_url param

forest mauve
lapis wasp
#

that event should be only fired when confirmPayment resolves successfully. I guess it can not be done on the client side, or at least it can be done on the receipt page

forest mauve
#

that event should be only fired when confirmPayment resolves successfully
So yeah you can do it on the receipt/success page then