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

Need help installing Overture Conversion Counter code

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 02-23-2005, 08:47 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

Are you sure you've got your tracking ID properly substituted? Is it just overture you are having problems with or is it Google? You definitely want the code only in your order_message.tpl. It should not be on any other page.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #12  
Old 02-23-2005, 10:24 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

On the note of overture, i noticed that i got a lot of mysql errors for some reason after enabling the advanced tracking on the overture control panel (the admin email contained the string from overture tracking)
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote
  #13  
Old 07-26-2006, 11:35 PM
 
eberghof eberghof is offline
 

Newbie
  
Join Date: Aug 2005
Location: California
Posts: 1
 

Default Still loking for where to place the overture tracking code

I've read many a post and still am not sure where to place the Overture tracking code in the order_message template for 4.0.XX.

Can someone please help?
__________________
X-Cart Gold 4.01
Reply With Quote
  #14  
Old 07-27-2006, 08:06 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

You can really place the Overture and Google code anywhere in the order_message.tpl file. Just forget about the <head> tags and just use everything between the <script></script> tags. For example, I have the following code at the very top of my order_message.tpl file with conditional statements so that it is only loaded if we are not in test mode and we are not looking at the printable version. Keep in mind that I'm using the 3.x branch of x-cart, but this should be very similar if not identical to what you would need to do.

Code:
{if $this_is_printable_version eq ""} {include file="location.tpl" last_location=$lng.lbl_order_processed last_url="cart.php"} {* assign a grand_total variable to hold the order total for advanced google conversion tracking by brett *} { if $test_mode != "Y" } {* assign var="grand_total" value="0" *} {literal} <SCRIPT LANGUAGE="JavaScript"> <!-- Overture Services Inc. 07/15/2003 var cc_tagVersion = "1.0"; var cc_accountID = "ABC123-use-your-own-id-here"; var cc_marketID = "0"; var cc_protocol="http"; var cc_subdomain = "convctr"; if(location.protocol == "https:") { cc_protocol="https"; cc_subdomain="convctrs"; } var cc_queryStr = "?" + "ver=" + cc_tagVersion + "&aID=" + cc_accountID + "&mkt=" + cc_marketID +"&ref=" + escape(document.referrer); var cc_imageUrl = cc_protocol + "://" + cc_subdomain + ".overture.com/images/cc/cc.gif" + cc_queryStr; var cc_imageObject = new Image(); cc_imageObject.src = cc_imageUrl; // --> </SCRIPT> {/literal} {/if} {capture name=dialog} <font class=ProductDetails>{$lng.txt_order_placed}</font> <font class=ProductDetails>{$lng.txt_order_placed_msg}</font> {/capture} {include file="dialog.tpl" title=$lng.lbl_confirmation content=$smarty.capture.dialog extra="width=100%"} {/if}

Then just before the closing {/capture} tag on my template, I put the Google Adwords conversion code, so the bottom of my template looks like this:

Code:
{if $test_mode != "Y"} <script language="JavaScript"> <!-- google_conversion_id = useryourownidhere; google_conversion_language = "en_US"; grand_total = {$grand_total}; {literal} if (grand_total) { google_conversion_value = grand_total; } {/literal} google_conversion_label = "Purchase"; --> </script> {literal} <script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js"> {/literal} </script> <noscript> <a href="https://services.google.com/sitestats/en_US.html" target=_blank> [img]https://www.googleadservices.com/pagead/conversion/useryourownidhere/?value={$grand_total}&label=Purchase&hl=en[/img] </a> </noscript> {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_invoice content=$smarty.capture.dialog extra="width=100%"}

Also, if you're using cartlab's Google Analytics mod, you could include that in the section that loops over the order items like so:

Code:
{section name=oi loop=$orders} {include file="customer/main/order_message_header.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order} {include file="customer/main/order_message_product_data.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order} {include file="customer/main/order_message_customer_info.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order} {include file="customer/main/order_message_totals.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order}<hr size=1 noshade> {if $active_modules.Interneka ne ""} { include file="modules/Interneka/interneka_tags.tpl" } {/if} {*** Google Analytics conversion tracking ***} {if $test_mode != "Y"} {include file="g_analytics.tpl" products=$orders[oi].products order=$orders[oi].order} {/if} {*** END Google Analytics conversion tracking ***} {/section}

Hope that helps.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote
  #15  
Old 10-17-2006, 10:42 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: Need help installing Overture Conversion Counter code

Do you know if this would work with X-cart 4.1.x release?

Thanks
-Tuan

Quote:
Originally Posted by minorgod
You can really place the Overture and Google code anywhere in the order_message.tpl file. Just forget about the <head> tags and just use everything between the <script></script> tags. For example, I have the following code at the very top of my order_message.tpl file with conditional statements so that it is only loaded if we are not in test mode and we are not looking at the printable version. Keep in mind that I'm using the 3.x branch of x-cart, but this should be very similar if not identical to what you would need to do.

Code:
{if $this_is_printable_version eq ""} {include file="location.tpl" last_location=$lng.lbl_order_processed last_url="cart.php"} {* assign a grand_total variable to hold the order total for advanced google conversion tracking by brett *} { if $test_mode != "Y" } {* assign var="grand_total" value="0" *} {literal} <SCRIPT LANGUAGE="JavaScript"> <!-- Overture Services Inc. 07/15/2003 var cc_tagVersion = "1.0"; var cc_accountID = "ABC123-use-your-own-id-here"; var cc_marketID = "0"; var cc_protocol="http"; var cc_subdomain = "convctr"; if(location.protocol == "https:") { cc_protocol="https"; cc_subdomain="convctrs"; } var cc_queryStr = "?" + "ver=" + cc_tagVersion + "&aID=" + cc_accountID + "&mkt=" + cc_marketID +"&ref=" + escape(document.referrer); var cc_imageUrl = cc_protocol + "://" + cc_subdomain + ".overture.com/images/cc/cc.gif" + cc_queryStr; var cc_imageObject = new Image(); cc_imageObject.src = cc_imageUrl; // --> </SCRIPT> {/literal} {/if} {capture name=dialog} <font class=ProductDetails>{$lng.txt_order_placed}</font> <font class=ProductDetails>{$lng.txt_order_placed_msg}</font> {/capture} {include file="dialog.tpl" title=$lng.lbl_confirmation content=$smarty.capture.dialog extra="width=100%"} {/if}

Then just before the closing {/capture} tag on my template, I put the Google Adwords conversion code, so the bottom of my template looks like this:

Code:
{if $test_mode != "Y"} <script language="JavaScript"> <!-- google_conversion_id = useryourownidhere; google_conversion_language = "en_US"; grand_total = {$grand_total}; {literal} if (grand_total) { google_conversion_value = grand_total; } {/literal} google_conversion_label = "Purchase"; --> </script> {literal} <script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js"> {/literal} </script> <noscript> <a href="https://services.google.com/sitestats/en_US.html" target=_blank> </a> </noscript> {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_invoice content=$smarty.capture.dialog extra="width=100%"}

Also, if you're using cartlab's Google Analytics mod, you could include that in the section that loops over the order items like so:

Code:
{section name=oi loop=$orders} {include file="customer/main/order_message_header.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order} {include file="customer/main/order_message_product_data.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order} {include file="customer/main/order_message_customer_info.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order} {include file="customer/main/order_message_totals.tpl" products=$orders[oi].products giftcerts=$orders[oi].giftcerts userinfo=$orders[oi].userinfo order=$orders[oi].order}<hr size=1 noshade> {if $active_modules.Interneka ne ""} { include file="modules/Interneka/interneka_tags.tpl" } {/if} {*** Google Analytics conversion tracking ***} {if $test_mode != "Y"} {include file="g_analytics.tpl" products=$orders[oi].products order=$orders[oi].order} {/if} {*** END Google Analytics conversion tracking ***} {/section}

Hope that helps.
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #16  
Old 01-24-2007, 09:49 AM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Default Re: Need help installing Overture Conversion Counter code

I placed my Google conversion code, enclosed in literal tags - {literal} java code {/literal}, at the bottom of the customer/main/order_message.tpl and it works fine. I'm using version 4.1.5.
__________________
Thanks,
Phil

X-Cart Gold
Version 4.4.5
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 11:51 AM.

   

 
X-Cart forums © 2001-2020