I can't find a way that really work fine to track conversions in Google Analytics
Here are the 3 solutions I tried:
Solution 1:
If I use the normal way (people are redirected to the thank you page after clicking on finish) all good, but as it is not necessary to click finish, if people don't click, the appointment is booked but the conversion is not recorded. so it is not accurate...
Solution 2:
as explained in an existing public ticket we can redirect to the thank you page with a piece of javascript inside the page where we have the Amelia shortcode
I used this solution for a while and I thought it was ok until I realise that we were missing plenty of booking (people were redirected to the thank you page before the email notification were sent) so I had to remove the code
I created an event when people click on the Confirm button. but again it is not accurate, let say that someone fill up the form but a mandatory field is not correct before they click on confirm, it will count a conversion. and when they correct and submit again it will count a second conversion
I find your Amelia plugin awesome. but it would be so much easier to track conversions if you implement an option where we can redirect to the thank you page after the Confirm button NOT after the finish button...
The other option I'm thinking:
Would it be possible to change the javascript of solution 2 by adding a 5 seconds delay. this delay would make sure the email notifications are sent properly before redirection?
The JS you mentioned is being executed after confirmed booking process, and just before that happens, the server receives the request to send an e-mail, so the e-mail is going to be sent either way.
The JS you pasted in your previous response works rather well and the e-mail will be sent even with the redirection code, so it's not waiting for the server to respond, but it executes JS immediately.
You mentioned this:
I created an event when people click on the Confirm button
So, you linked it to the button. Try using the JS without linking it to the Confirm button, and it should work fine.
You can also set the delay in our JS method with (for example) setTimeout JS method.
I created an event when people click on the Confirm button
The script that should be included on the page isn't linked to the Confirm button, so simply un-link it from the button and it should work as intended.
The hook beforeConfirmedBooking will be triggered when your customers confirm booking:
Hi Amelia team,
I can't find a way that really work fine to track conversions in Google Analytics
Here are the 3 solutions I tried:
Solution 1:
If I use the normal way (people are redirected to the thank you page after clicking on finish) all good, but as it is not necessary to click finish, if people don't click, the appointment is booked but the conversion is not recorded. so it is not accurate...
Solution 2:
as explained in an existing public ticket we can redirect to the thank you page with a piece of javascript inside the page where we have the Amelia shortcode
I used this solution for a while and I thought it was ok until I realise that we were missing plenty of booking (people were redirected to the thank you page before the email notification were sent) so I had to remove the code
Solution 3:
I created an event when people click on the Confirm button. but again it is not accurate, let say that someone fill up the form but a mandatory field is not correct before they click on confirm, it will count a conversion. and when they correct and submit again it will count a second conversion
I find your Amelia plugin awesome. but it would be so much easier to track conversions if you implement an option where we can redirect to the thank you page after the Confirm button NOT after the finish button...
The other option I'm thinking:
Would it be possible to change the javascript of solution 2 by adding a 5 seconds delay. this delay would make sure the email notifications are sent properly before redirection?
Thank you very much for your help
Clem
Hello Clem
The JS you mentioned is being executed after confirmed booking process, and just before that happens, the server receives the request to send an e-mail, so the e-mail is going to be sent either way.
The JS you pasted in your previous response works rather well and the e-mail will be sent even with the redirection code, so it's not waiting for the server to respond, but it executes JS immediately.
You mentioned this:
I created an event when people click on the Confirm button
So, you linked it to the button. Try using the JS without linking it to the Confirm button, and it should work fine.
You can also set the delay in our JS method with (for example) setTimeout JS method.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksandar,
Both of the solutions you mentioned sounds good to me but I don't know how to write JS code:
Would you be able to provide a piece of code for 1of these solutions (which ever is the simplest to implement)?
1) Try using the JS without linking it to the Confirm button, and it should work fine.
OR
2)You can also set the delay in our JS method with (for example) setTimeout JS method.
Thank you very much
Clem
Hello Clem
You mentioned this when you opened the ticket:
I created an event when people click on the Confirm button
The script that should be included on the page isn't linked to the Confirm button, so simply un-link it from the button and it should work as intended.
The hook beforeConfirmedBooking will be triggered when your customers confirm booking:
When you insert this to your page, it should work only when the appointment is booked, not when you click on the button.
Unfortunately, writing custom scripts is not included in the provided support for the plugin, so I'm sorry to say that I cannot help you with that.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi again Clem
One of our users posted a public ticket that can help you out:
https://tmsplugins.ticksy.com/ticket/2278713
Please check it out, and let me know if it helps.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksandar,
Thanks for your help and I'm super glad that Ivan shared this piece of code.
I installed it, did many test and so far it seems to work beautifully. (All notifications are sent) 🙂
Great news, Clem
You're welcome, glad I could help. I'm sure Ivan's code will help a lot of people!
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Best regards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables