View Single Post
  #1  
Old 01-26-2012, 11:14 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default variable for order total

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.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote