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:
{literal} 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:
<TABLE border="0" width="100%"> 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:
{* $Id: order_message.tpl,v 1.32.2.1 2004/09/14 06:02:27 max Exp $ *} Hope some of you find this helpful. Brian |
Nice summary :) Always nice to find ALL the info in one place!
|
:!: Moved to Completed Custom Mods & Templates.
|
How about Signup?
Any idea how to add the adwords tracking for signups?
|
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?
|
It shows up on mine
It shows up after I complete a checkout.. at the bottom of the page.
|
Hmmm... all I see is the regular print invoice and continue shipping options. nothing at all related to google.
|
If you want to post the code, I'll look at it.
I'll take a look if you like.
|
Any idea why some of the google code has no data where the xcart objects should be? My checkout code appears as:
Code:
<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js"> should I not have something for the 'value=' querystring ? Code:
{literal} |
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:
{ include file="modules/Interneka/interneka_tags.tpl" } Code:
</script> In my code (that works) the Code:
{/section} statement comes BEFORE the google code. like so.. Code:
{ include file="modules/Interneka/interneka_tags.tpl" } Mark Robinson HandicappedPets.com |
All times are GMT -8. The time now is 02:46 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.