I am trying to set up my google conversion analytics and supposedly I can use this
Code:
<!-- Google Code for Placed Order Conversion Page -->
<script type="text/javascript">
<!--
var google_conversion_id = xxxxxxxxxx;
var google_conversion_language = "en_US";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "Xxxxxxxxxx";
var google_conversion_value = 0;
if (<? echo $order.total ?>) {
google_conversion_value =<? echo $order.total ?>;
}
//-->
</script>
<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
...
I have 2 questions, 1. is $order.total the correct variable for the order total on the thank you page, and for the line
Code:
google_conversion_value =<? echo $order.total ?>;
should there be a ; or no ;? The code snippet on googles page had it without the ; but it wasn't working so I added it. (still doesn't work) but i'm not sure if it is because my variable is wrong or the ;.
Anyone know?
Thanks.