Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Google Conversion Tracking

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-29-2003, 04:20 PM
 
successful successful is offline
 

eXpert
  
Join Date: Sep 2002
Location: Brooklyn
Posts: 208
 

Default Google Conversion Tracking

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 ?
__________________
Visit us at http://www.Successfulhosting.com
We\'ll make your web site a success!

Register your own domain name for only $14.99 at http://DiscountDomainRegistry.com
Reply With Quote
  #2  
Old 10-30-2003, 07:52 AM
 
successful successful is offline
 

eXpert
  
Join Date: Sep 2002
Location: Brooklyn
Posts: 208
 

Default

Nobody ?
__________________
Visit us at http://www.Successfulhosting.com
We\'ll make your web site a success!

Register your own domain name for only $14.99 at http://DiscountDomainRegistry.com
Reply With Quote
  #3  
Old 10-30-2003, 08:13 AM
 
dealsondeals dealsondeals is offline
 

eXpert
  
Join Date: Dec 2002
Location: Dallas, Texas, USA
Posts: 231
 

Default

, Pardon me if this is a simplistic question,

You did wrap the javascript in {literal} {/literal} tags right?

Regards,

Glen
__________________
Never understimate stupidity.
--------
X-Cart Version: 3.5.2
Hosting:mind-in-design.net
Configuration: Virtual Dedicated Server || Intel Pentium 4 2.4 GHZ CPU || 1024MB PC2100 DDR RAM || Linux || PHP 4.3.2 || MySQL server 4.0.14
Reply With Quote
  #4  
Old 10-30-2003, 09:09 AM
 
jpsowin jpsowin is offline
 

X-Adept
  
Join Date: Sep 2002
Posts: 459
 

Default

That would certainly do it...
__________________
Joshua Sowin
...taking things one TPL at a time.
Reply With Quote
  #5  
Old 10-30-2003, 11:38 AM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

Yeah you need do do it as a {literal} include but make sure you generate the right code for your site, i.e google does it for both http: and https://

You'll also find it sticks a silly image on your site too.
__________________
Groovico

Used by X-carters the world over:
Marketing Manager Pro Bundle For X-cart
Featured Product Manager for X-cart
Feed manager pro for X-cart

http://www.firetanksoftware.com

Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X
Reply With Quote
  #6  
Old 11-03-2003, 12:53 PM
 
successful successful is offline
 

eXpert
  
Join Date: Sep 2002
Location: Brooklyn
Posts: 208
 

Default

Guys,

Sorry I'm not a programmer.....can you show me an example that would work for my site ?

TIA!
__________________
Visit us at http://www.Successfulhosting.com
We\'ll make your web site a success!

Register your own domain name for only $14.99 at http://DiscountDomainRegistry.com
Reply With Quote
  #7  
Old 11-03-2003, 01:18 PM
 
jpsowin jpsowin is offline
 

X-Adept
  
Join Date: Sep 2002
Posts: 459
 

Default

Code:
{literal} <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> {/literal}
__________________
Joshua Sowin
...taking things one TPL at a time.
Reply With Quote
  #8  
Old 11-03-2003, 01:34 PM
 
successful successful is offline
 

eXpert
  
Join Date: Sep 2002
Location: Brooklyn
Posts: 208
 

Default

Thanks...that was wayyy to easy
__________________
Visit us at http://www.Successfulhosting.com
We\'ll make your web site a success!

Register your own domain name for only $14.99 at http://DiscountDomainRegistry.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:27 PM.

   

 
X-Cart forums © 2001-2020