VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sandomatyas on November 11, 2016, 09:24:18 AM

Title: Add custom tracking data to thank you page
Post by: sandomatyas on November 11, 2016, 09:24:18 AM
I want to add a custom tracking data to the thank you page of the site. It contains some php (sending data via web service), some javascript (based on the data which I get back from the web service) and some html (noscript iframe).
This code isn't related to any payment plugins so I need these every time when a customer gets to the thank you page, even if he chosed standard payment or paypal, etc.
I think vmcustom plugin's plgVmConfirmedOrder method would be the best solution but how can I pass this data and not override any html response which comes from the payment plugin? What is the correct way to do that?
Title: Re: Add custom tracking data to thank you page
Post by: K&K media production on November 11, 2016, 12:05:50 PM
you can use a override for

components\com_virtuemart\views\cart\tmpl\order_done.php
Title: Re: Add custom tracking data to thank you page
Post by: sandomatyas on November 11, 2016, 14:43:18 PM
Thanks, this is a possibility indeed but if it is possible I want to do that with a plugin.
Title: Re: Add custom tracking data to thank you page
Post by: Milbo on November 11, 2016, 21:38:41 PM
trigger "plgVmConfirmedOrder"
Title: Re: Add custom tracking data to thank you page
Post by: Studio 42 on November 12, 2016, 13:14:01 PM
Quote from: Milbo on November 11, 2016, 21:38:41 PM
trigger "plgVmConfirmedOrder"
Max, this not work for external paiement as credit cart.
In all case currently you cannot track at 100% virtuemart, because some user do not return to the site.
I tried many plugins and none work at 100%.
I implemented CURL for piwik, but even using curl, it's not right at 100%.
tracking backend have the same problem, because some tracing check for IP and not order number.