#tata-confirmation-analytics
1 messages ยท Page 1 of 1 (latest)
no, it should be done on the client, so is a js that must be called let's say if (!error){
then it should call the gtag
and then the redirect
}
doing the gtag on the server (after the redirect) is not a solution
Yeah that's not possible, unless you aren't accepting any redirect-based payment method types, in which case you could use redirect: if_required with confirmPayment() (https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect)
I've tried removing the redirect_url, but is mandatory
so is there any solution for my issue?
let me rephrase myself.
There should be a lot of people working with stripe + gtag, how should I proceed in order to be able to track the gtag data?
I already answered that above. You have two options:
- use the gtag on your redirect page
- set
redirect: if_requiredand turn off any redirect-based Payment Method Types. This will prevent the redirect from happening and you can use the gtag in that code then redirect yourself afterward if you so desire.
ok, thanks for your time and your answers. I will check the solutions you've provided and if I come with any question I will reach you ๐
๐