X-Cart Mods, X-Cart Addons - WebsiteCM
 
X-Cart Excellence eZine
Subscribe for proven tips and special discounts!
   Forum Search
Forum Menu
Quick Links
Forum Login
Username:

Password

Remember Me
Forum Expert(s)
X-Cart Mods, X-Cart Addons - WebsiteCM
Developing websites since the early-to-mid 90's, and working extensively with e-commerce since 2001, Jon Peters of WebsiteCM is equipped to assist you with your design, programming, e-commerce, and x-cart specific questions.

Integrating Google Adwords with X-Cart 4.1.x Gold

About this Thread:
You are viewing the thread Integrating Google Adwords with X-Cart 4.1.x Gold in the eCommerce forum.

  #1  
Old February 1st, 2008, 10:59 AM
admin admin is offline
Jon Peters (Admin)
 
Join Date: Aug 2007
Location: Vancouver, Canada
Posts: 85
Default Integrating Google Adwords with X-Cart 4.1.x Gold

The following x-cart how-to will take you through the steps of integrating google adwords with x-cart 4.1.x Gold.

Log into your google adwords account, and find click on "Conversion Tracking." On the conversion tracking page, click on "Get conversion page code."

On step one check "Purchase/Sale" and then click "Continue."

On step two, select your formating.

On step three, fill in your configuration (note in most cases you will want your security level to be [url]https://)[/url]. You will then find javascript code provided, that looks similar to:

Code:
<!-- Google Code for purchase Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = XXXXXXXXXX;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "FFFFFF";
if (1) {
  var google_conversion_value = 1;
}
var google_conversion_label = "purchase";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/1068100551/imp.gif?value=1&label=purchase&script=0">
</noscript>
In that code, FIND and REPLACE:

Code:
if (1) {
  var google_conversion_value = 1;
}
with:

Code:
var google_conversion_value = "{/literal}{$orders[oi].order.subtotal}{literal}";
Add {literal} above your code, and {/literal} below your code, so it will now appear similar to:

Code:
{literal}
<!-- Google Code for purchase Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = XXXXXXXXXX;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "FFFFFF";
var google_conversion_value = "{/literal}{$orders[oi].order.subtotal}{literal}";
var google_conversion_label = "purchase";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/1068100551/imp.gif?value=1&label=purchase&script=0">
</noscript>
{/literal}
In your x-cart template files, locate and edit the file skin1/customer/main/order_message.tpl

In that x-cart template file, copy and paste your updated google adsense code BEFORE:

Code:
{/section}

Last edited by admin : February 5th, 2008 at 09:49 PM. Reason: {literal}{/literal} tags were missing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old February 6th, 2008, 08:16 AM
fournier fournier is offline
Junior Member
 
Join Date: Dec 2007
Posts: 1
Default Xcart 4.0

We have xcart version 4.0.14. Will these steps work on that version? Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old February 7th, 2008, 10:28 AM
admin admin is offline
Jon Peters (Admin)
 
Join Date: Aug 2007
Location: Vancouver, Canada
Posts: 85
Default

I do believe so.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

Site Map