News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Add Google Conversion Tracking to Head of Thank you page

Started by adellaguardia, December 10, 2018, 00:23:06 AM

Previous topic - Next topic

adellaguardia

Hello,
I have been researching this with no resolution. I need to add a piece of Google code to the HEAD of the thank you page for VM to track conversions. I have created the order_done.php file in the template folder as needed for an override, but my script does not appear.
/templates/template_name/html/com_virtuemart/cart/order_done.php

I've added the script by itself above the php code, I've added it using:
$script = "script here";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration( $script );

Nothing seems to work. Do I have to purchase an expensive plugin in order to track conversions? I only need the script on the thank you page in the HEAD section, not on every page.
Can you help?

Joomla 3.9.1
VM 3.4.2
Database Version 10.0.37-MariaDB
PHP Version 5.6.38 (working on getting this updated)
https://hospitalitylamps.com/

StefanSTS

Hello,

the order_done.php is now called orderdone.php.
Renaming the file should do the job, except you use a One Page Checkout that might use a different orderdone.php in it's own file structure.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.


depika

It would be very helpful if you could share the script!! Or at list PM me the code. Thank you in advance