| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Google Adwords Conversion Tracking: a how-to on adding code | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Google Adwords Conversion Tracking: a how-to on adding code
I recently added the AdWords Conversion Tracking code into my X-Cart store (version 4.0.14) by going through several threads here on the forum. All of them had only bits and pieces of how to clearly add the code into your store. So I wanted to post all the things I did and provide a cut/paste of my code with some explanation and options as far as the little Google displayed message.
STEPS: 1.) First off, you need to activate the Conversion Tracking portion in your AdWords account. You need to do this only to get your account's Conversion ID number. NOTE: your AdWords customer ID is NOT your Conversion ID. You'll get this Conv. ID number after you answer a few questions inside their step-through and will finally get to a point that they tell you to click inside the textarea box to copy the code for your store. You DO NOT want to use their code, you only want to dig out of it your "google_conversion_id". 2.) Make a backup of your skin1/customer/main/order_message.tpl file. 3.) Inside your order_message.tpl file, locate the {/section} code (line 19 in my v4.0.14 file) and add a few blank lines inbetween that and the {/if} on line 18. 4.) paste the following in: Code:
NOTE: this snippet of code is a little different (i.e. it's not all the code) than what others have posted, but let me get to the next few steps and it'll all fall into place and make more sense. 5.) replace the "1234567890" above with your 10-digit Conversion ID number. Again, this number is NOT your AdWords customer ID. 6.) Step 4 only added the first half of the code. The second half is actual displayed sentence that Google forces us to show. It looked really stupid to have it as part of the above, because it was showing right above the "Print Invoice" and Continue Shopping button. So what I decided to do, is to insert a few blank lines under that piece of default code, and then display this Google text.... 7.) locate this piece of default code: Code:
and add a few blank lines inbetween the </TABLE> and the {/if}. Now add this second half of the Conversion code: Code:
This adds 2 blank lines, and then adds the Google text under. Make sure to replace the "1234567890" above with your 10-digit Conversion ID number here as well. 8.) optional: step 7 will add the Google text on the left hand side of the page. If you want it centered, you can put the second half of the code into a table like this: Code:
Make sure to replace the "1234567890" above with your 10-digit Conversion ID number here as well. That should do it! This works great for my v4.0.14 store, you may have to mess with it a bit if you see differences in the code. Here is one big copy/paste of my entire order_message.tpl so you can see it all in case that helps you: Code:
Hope some of you find this helpful. Brian
__________________
X-Cart Gold v4.0.18 [unix] - Easy Checkout module - ezUpsell module - CDSEO module X-Cart Gold v4.1.11 [unix] ***38,000+ active products! - CDSEO module - Address Book module - Reorder module - Smart Search module X-Cart Gold v4.4.2 [unix] - in development now! |
|||||||
#2
|
|||||||
|
|||||||
Nice summary Always nice to find ALL the info in one place!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#4
|
|||||||||
|
|||||||||
How about Signup?
Any idea how to add the adwords tracking for signups?
__________________
X-Cart version 4.4.5 PHP 5.1.6 GD bundled (2.0.28 compatible) MySQL server 5.0.45 MySQL client 5.0.45 Web server Apache/2.2.3 (CentOS) Operation system Linux Perl not found XML parser (expat) found X-Cart directory size 316 Mb |
|||||||||
#5
|
|||||||
|
|||||||
I just tried adding this to my cart. All of the code shows up but I don't see the little google graphic on my checkout page. Does that mean it is not functioning?
__________________
--- Patrick Allmond Xcart 4.0.18 Now on a dedicated linux box |
|||||||
#6
|
|||||||||
|
|||||||||
It shows up on mine
It shows up after I complete a checkout.. at the bottom of the page.
__________________
X-Cart version 4.4.5 PHP 5.1.6 GD bundled (2.0.28 compatible) MySQL server 5.0.45 MySQL client 5.0.45 Web server Apache/2.2.3 (CentOS) Operation system Linux Perl not found XML parser (expat) found X-Cart directory size 316 Mb |
|||||||||
#7
|
|||||||
|
|||||||
Hmmm... all I see is the regular print invoice and continue shipping options. nothing at all related to google.
__________________
--- Patrick Allmond Xcart 4.0.18 Now on a dedicated linux box |
|||||||
#8
|
|||||||||
|
|||||||||
If you want to post the code, I'll look at it.
I'll take a look if you like.
__________________
X-Cart version 4.4.5 PHP 5.1.6 GD bundled (2.0.28 compatible) MySQL server 5.0.45 MySQL client 5.0.45 Web server Apache/2.2.3 (CentOS) Operation system Linux Perl not found XML parser (expat) found X-Cart directory size 316 Mb |
|||||||||
#9
|
|||||||
|
|||||||
Any idea why some of the google code has no data where the xcart objects should be? My checkout code appears as:
Code:
should I not have something for the 'value=' querystring ? Code:
__________________
--- Patrick Allmond Xcart 4.0.18 Now on a dedicated linux box |
|||||||
#10
|
|||||||||
|
|||||||||
ID Code?
I'm a little concerned about the line that contains:
pagead/conversion/12345678/? This is not your Google ID #. For mine, I went to the advords site and got the code from the code generator there, then split up the code according to this post. Although in the code you sent me privately, your codes seem to be OK. Could this be the problem? In the code you sent me privately, you read Code:
Code:
In my code (that works) the Code:
statement comes BEFORE the google code. like so.. Code:
Mark Robinson HandicappedPets.com
__________________
X-Cart version 4.4.5 PHP 5.1.6 GD bundled (2.0.28 compatible) MySQL server 5.0.45 MySQL client 5.0.45 Web server Apache/2.2.3 (CentOS) Operation system Linux Perl not found XML parser (expat) found X-Cart directory size 316 Mb |
|||||||||
|
|||
X-Cart forums © 2001-2020
|