Google recently released a conversion tracking tool. In order to use their tool you need to add the to your order confirmation/receipt page.
I edited the /customer/main/order_message.tpl template and added the following:
Code:
<script language="JavaScript">
<!--
google_conversion_id = 1072730847;
google_conversion_language = "en_US";
if ($order.total) {
google_conversion_value = $order.total;
}
google_conversion_label = "Purchase";
-->
</script>
<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<a href="https://services.google.com/sitestats/en_US.html" target=_blank>
[img]https://www.googleadservices.com/pagead/conversion/1072730847/?value=$order.total&label=Purchase&hl=en[/img]
</a>
</noscript>
I received the following error when I tried to place my order. Instead of the normal receipt page I received:
Fatal error: Smarty: [in customer/main/order_message.tpl line 29]: syntax error: invalid attribute name - '=' in /home/xcart/public_html/store/Smarty-2.3.0/Smarty_Compiler.class.php on line 1398
Anybody have any idea what I'm doing wrong and how I can correct this issue ?
Also, it would be nice to be able to use the order total
without shipping charges included. Is this possible ?