In order to track pay-per-click performance, I need to include a revised version of the following JS snippet somewhere in the order process. I assume the right file is /customer/main/order_message.tpl (if I am wrong, please correct me).
Code:
<script language="JavaScript" type="text/javascript" src="https://www.trackhelp.com/bin/ctrack.php"></script>
<script language="JavaScript" type="text/javascript">
<!--
var siteid = 1626; var proto = 'https';
if (typeof(valid) + '' != 'undefined') {tlitrack(3,ORDER_SUBTOTAL,ORDER_NUMBER);}
//-->
</script>
In the script above, I have to somehow substitute {$subtotal} for ORDER_SUBTOTAL and {$order.orderid} for ORDER_NUMBER.
I tried the following, and it broke the ordering process:
Code:
if (typeof(valid) + '' != 'undefined') {literal}{tlitrack(3,{/literal}{$subtotal},{$order.orderid}{literal});}{/literal}
I'm guessing that embedding the {literal} tag within a javascript {tag} is a no-go.
Can someone offer an alternative approach?
Thanks