X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart (https://forum.x-cart.com/showthread.php?t=44868)

Squeeze Juice Marketing 01-16-2009 03:51 PM

Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
From the post: How to Install AdWords Tracking in X-Cart

Conversion tracking is an integral part of a successful AdWords campaign. It allows advertisers to see what keywords and strategies are working vs those that are wasting money.

To be frank and honest - if you are not using conversion tracking you shouldn’t be using AdWords – it’s that important. It would be like watching two NFL teams in the SuperBowl with no way to see any touchdowns or know the score throughout the entire game...what's the point in that?


This tutorial will show you how to correctly install the AdWords conversion tracking code within your X-Cart shopping cart store to record sales but ALSO capture the dollar amount of each sale.
We are going to start from scratch…


Part I. Getting the Code
  1. Login to your AdWords Account and the top ‘Campaign Management Tab’ click the ‘Conversion Tracking’ link.
  2. Click the ‘Create an Action’ button for new users or ‘+Create a New Action’ for users already tracking conversions.
  3. On the next page start off by filling in - Name your action. I will put ‘Sale’.
  4. On the drop down menu underneath ‘This action is used for tracking:’ select Purchase / Sale
  5. In Revenue for your action box enter 1.0 (we will be changing this later don’t worry)
  6. On the conversion page security level drop down choose http or https depending on your website set-up (most of the time this will be https://)
  7. Choose the text format, I would recommend just choosing the first option
  8. Click ‘Save Action & Get Code', should look similar to this:

You will be taken to a new page containing your code.

Squeeze Juice Marketing 01-16-2009 03:53 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Part II. Configuring the Code

Copy and paste the code into the Squeeze Juice Marketing AdWords Conversion Code Template – downloadable for free at the link listed earlier.


Next, paste your code BELOW the included code in the template.

This is the tricky part so be sure to TRIPLE check for accuracy –
Take the variables highlighted below from your code and paste them OVER the matching color code in the now modified Squeeze Juice Marketing Template as pictured below:



Note: you will paste the conversion_id and conversion label code twice (one in the first script, and then again the document.write url below).



Once you’ve triple checked the correct pasting of your variables delete the original pasted code on the bottom leaving just the Squeeze Juice Marketing Template code as pictured:




http://www.squeezejuicemarketing.com/skin1/images/finalcodesmall.gif

Squeeze Juice Marketing 01-16-2009 03:54 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Part III. Installation

In order for this to work you MUST have the Google Analytics Module turned on and Use E-Commerce analysis box checked in the Admin->General Settings->Google Analytics

(Be sure to backup all files before modifying)

Log into your site with your FTP client and download skin1/modules/Google_Analytics/ga_commerce_form.tpl
Paste your newly configured Adwords conversion code into the end of this file, on a new line.


Save and upload the adjusted ga_commerce_form.tpl.


That’s it! You’re set!

If you would like to verify that it is working, place a test order, then view the source code the receipt page and you should see your code towards the bottom of the page with the order subtotal information in the value field. If you want to test it entirely, do a search that will trigger one of your ads, click on it, and complete a transaction.

Enjoy!

PS – If you would like to use the order total (with taxes and shipping) for your transaction value reports instead of the subtotal replace {$order.order.subtotal} with {$order.order.total} in the variable section and url.

toppen56 04-17-2009 04:57 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Thanks for these instructions. You mention adding the code on the "last line" of the ga_commerce_form.tpl file. Do you mean before the </script> tag or after it?

toppen56 04-17-2009 05:01 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Ignore my question. It needs to be after the </script> tag since these lines are a new script.

Squeeze Juice Marketing 04-17-2009 06:15 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Yes exactly.

I'm glad you found it helpful!

hoosierglass 04-17-2009 07:54 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
I am curious as to why the document template has
document.write("
in the code before the <image command but it is not in the example of the pasted code.

Squeeze Juice Marketing 04-17-2009 07:56 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by hoosierglass
I am curious as to why the document template has
document.write("
in the code before the <image command but it is not in the example of the pasted code.


I'm sorry I don't quite understand what you are asking.

Are you having a problem with the code not working?

hoosierglass 04-17-2009 08:52 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
In your template code image you show the template as

Code:

<noscript>document.write("<img height=\"1\" width=\"1\" border=\"0\" src=\"https://www.googleadservices.com/pagead/conversion/XXXXXXXXXX/?value={$order.order.subtotal}&amp;label=PASTECONVERSIONLABELHERE&amp;script=0\"/>");</noscript>

But in the code you paste you leave out the document.write as shown below.

Code:

<noscript><img height=\"1\" width=\"1\" border=\"0\" src=\"https://www.googleadservices.com/pagead/conversion/XXXXXXXXXX/?value={$order.order.subtotal}&amp;label=PASTECONVERSIONLABELHERE&amp;script=0\"/></noscript>

which way is correct????

Squeeze Juice Marketing 04-17-2009 09:01 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by hoosierglass
In your template code image you show the template as

Code:

<noscript>document.write("<img height=\"1\" width=\"1\" border=\"0\" src=\"https://www.googleadservices.com/pagead/conversion/XXXXXXXXXX/?value={$order.order.subtotal}&amp;label=PASTECONVERSIONLABELHERE&amp;script=0\"/>");</noscript>




This is correct.

AdWords does have you paste a slighty different code as you noted, but we have to tweak it for X-Cart.

Let me know if you have any other questions.

MrHeeltoe 04-25-2009 08:04 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
I've got 4.0 and don't have a module for Google analytics...so what can I do about this?

Squeeze Juice Marketing 04-27-2009 08:49 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by MrHeeltoe
I've got 4.0 and don't have a module for Google analytics...so what can I do about this?


Hello. For X-Cart versions without the Google Analytics module you can do the following:

1. Create a new directory skin1/modules/Google_Analytics

2. Create a new file ga_commerce_form.tpl (this is where you paste the AdWords conversion code after following the instructions in the first three posts)

3. Upload the ga_commerce_form.tpl file to the new directory you created in step 1 (skin1/modules/Google_Analytics)

4. Open skin1/customer/home.tpl

Paste:

{if $smarty.get.mode eq "order_message"}
{include file="modules/Google_Analytics/ga_commerce_form.tpl"}{/if}

before </body>

All set, I hope this helps!

Squeeze Juice Marketing 04-27-2009 08:55 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by matrixa59
Thanks for this it seems to work great. however i have have commerce tracking enabled in google analytic and the e commerce conversions always seem higher by one or two transactions than the conversion reported in ad words directly. Is this normal. Which should i trust


Fantastic, I'm glad you found it helpful.

AdWords and Analytics reporting use two different tracking methods, so the answer is "they're both right" :lol:. AdWords cookies last for 30 days whereas Analytics cookies last for 6 months. How the visitor last entered your site can make a difference. For example:


Let's say a visitor clicked on your AdWords ad, visited your site but didn't purchase and left. Later that day he search "your site name" into google, clicked on an organic link and purchased an item.

This would show up as an organic sale in Analytics, but it would also show up as a conversion in Adwords for the keyword he clicked on.


Use them both together but don't take either as 'exact'. Also, out of the box the X-Cart code for Google Analytics doesn't always work correctly so that could be an issue as well.

MrHeeltoe 06-30-2009 05:30 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Ok I think I got it....I guess we need to see now how she works!

chrischall 09-21-2009 05:56 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Ryan,

Is it possible to get the code for tracking analytics as well as adwords in 4.0? Should I just copy the code from ga_commerce_form.tpl in a 4.1 install?

Cheers,

Chris

Squeeze Juice Marketing 09-21-2009 07:39 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by chrischall
Hi Ryan,

Is it possible to get the code for tracking analytics as well as adwords in 4.0? Should I just copy the code from ga_commerce_form.tpl in a 4.1 install?

Cheers,

Chris


Hi Chris,

For the AdWords tracking in 4.0 you can follow the instructions from post #13 of this thread.

For the analytics portion I'm afraid it is a bit more complicated than just inserting the code. If you have a 4.1+ installation to compare you can copy from that set-up just note that by default it does not have the proper configuration.

If you need more personalized assistance feel free to drop me a PM or e-mail.

chrischall 09-22-2009 02:30 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Ryan,

Thanks for replying Ill look at a 4.1 install and see if I can work it out!!

Acquamarina 01-23-2010 08:28 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi,
Followed the directions and I can see the code on the order confirmation page, but it is not showing in the Conversion Page on Google. The order has to be marked as paid to appear, correct? Maybe that is the missing step.

Thank you for the great instructions, very easy to follow.

Squeeze Juice Marketing 01-23-2010 02:59 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Vera I'm glad you found it helpful!

No, the paid status is independent of whether a conversion is counted or not. I recommend reading the post on X-Cart Conversion tracking when you have a moment to get a better feel for how it works.

Also, conversions can take up to 24 hours to be counted.

kcar 07-08-2010 08:27 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
I thought I would try tracking my ads and before I came here I found this info in the adwords help files. "Requirements

The only requirements for installing conversion tracking on your website are as follows:

* AdWords ads that are approved and running
* Placement of the Google code snippet on the conversion page"

Soo my question is, do we really have to have Analytics installed in order to have conversion tracking work?

I'm running ver 4.19 if that makes any difference.

Squeeze Juice Marketing 07-09-2010 05:42 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Kcar,

You are not required to installed Google Analytics for AdWords.

AdWords has it's own 'smaller' analytics called 'Conversion Tracking' which is what this thread refers to, and must be installed in order to evaluate AdWords performance.

You *should* also be using Google Analytics. Not using Google Analytics is the equivalent of never looking at your business financial statements. How would you know if you're doing ok, or even headed in the right direction?

ephesians525 09-21-2010 06:52 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi,
We are having issues with the tracking URL's used by Google AdWords / Analytics. We have setup auto-tagging but redirects set up on the X-Cart site are removing auto-tagging information from the URLs. I think it may be a module called CDSEO Pro that is appending the auto-tagging URL's but I am not sure.
Auto-tagging automatically adds a parameter to the end of each of our AdWords destination URLs in order to identify visitors as AdWords referrals. The tag captures keyword, campaign, ad content information, and our ad's position when a user clicked it. The parameter used in auto-tagging is called "gclid." However, due to the X-Cart website's redirect, the gclid parameter is being removed from the URL.
Do you have any idea why this is happening and whether it is the CDSEO Pro Module, or another a URI rewrite engine as part of X-Cart that is modifying these URL's?
Thank You

Squeeze Juice Marketing 09-23-2010 06:56 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
I don't think that is an issue with CD-SEO, I haven't seen it strip the gclid parameter.

It may have something to do with your server or a previous mod.

deano1971 11-03-2010 03:48 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Thanks for tutorial but the template is downloading as a html document. Is that right?

Squeeze Juice Marketing 11-03-2010 04:39 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Deano,

It is a .txt file. You need to right-click on the link and choose 'Save As'.

Alternatively you can highlight the code and copy & paste it into the corresponding .tpl

ephesians525 11-04-2010 04:11 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by Squeeze Juice Marketing
I don't think that is an issue with CD-SEO, I haven't seen it strip the gclid parameter.

It may have something to do with your server or a previous mod.

So you don't think its anything to do with X-Cart itself or CD-SEO, but perhaps a mod on X-Cart? I have checked the server and there is nothing on the server that would cause the stripping of the gclid parameter from the site URL's. Have you ever heard of this sort of thing happening before. The site has several mods applied so I wouldn't know where to start, it its a mod causing the problem?
Thanks

Squeeze Juice Marketing 11-07-2010 02:40 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Caroline,

I have not seen issues with CD-SEO and AdWords gclid tracking. Did you install the mod or have it professionally installed?

Unfortunately it could be any number of issues from something in your .htaccess to a random X-cart mod. You will want to start by reviewing the mods. I would also double check the host as I've seen that as an issue several times.

emtucker 12-29-2010 09:56 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Ryan,

What do you put as the Goal URL when you are doing the set up on the AdWords end? I found this:

/cart\.php\?mode=order_message&orderids=

But, would it actually look like this?: http://www.mydomainname.com/cart\.php\?mode=order_message&orderids= or this http://www.mydomainname.com/cart.php?mode=order_message&orderids=

Thanks!

Eva

Squeeze Juice Marketing 12-29-2010 10:16 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by emtucker
Hi Ryan,

What do you put as the Goal URL when you are doing the set up on the AdWords end? I found this:

/cart\.php\?mode=order_message&orderids=

But, would it actually look like this?: http://www.mydomainname.com/cart\.php\?mode=order_message&orderids= or this http://www.mydomainname.com/cart.php?mode=order_message&orderids=

Thanks!

Eva


Hi Eva,

I'm not quite sure what you are referencing here.

AdWords conversion tracking does not require any URL inputs, just installation of the tracking script.

If you are referring to Google Analytics goal setting that is a separate topic, Google has a help page on setting up goals here: http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55515

emtucker 12-29-2010 10:23 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
I am working with an SEO person that gave me the conversion code to put in and said that he needed a URL of a static page to enter in on the Adwords side of things. I think that he is saying it needs to be static, just so that it will be the same everytime.

I pulled /cart\.php\?mode=order_message&orderids= in reference to this post: http://forum.x-cart.com/showthread.php?t=44076&highlight=Google+Goal+Track ing

Thanks for your help!

Squeeze Juice Marketing 12-29-2010 10:28 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Hi Eva,

I suggest having your SEO person read this thread - it will answer all his questions on setting up the AdWords conversion code in X-Cart.

No static page is needed, the code can go in the skin1/modules/Google_Analytics/ga_commerce_form.tpl

RPZ620 07-31-2011 03:09 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Is this code insert still needed wit 4.4.2 google mod?.

Squeeze Juice Marketing 08-01-2011 04:05 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Quote:

Originally Posted by RPZ620
Is this code insert still needed wit 4.4.2 google mod?.


Yes because this code is for the Google AdWords code (NOT Google Analytics).

X-Cart does include a built-in Google Analytics mod, but there are additional settings needed on the Google account side for optimal reporting.

If you are confused between Google AdWords / Analytics you may want to review this post for clarification: http://www.squeezejuicemarketing.com/blog/x-cart-conversion-tracking-clearing-up-common-misconceptions/

voodoo1967 04-07-2012 05:21 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Have run through this, got the code, added it to the analytics file , re checked the settings - all correct. Checked the code on the invoice page to make sure it was there - which it was and then went through a real transaction - ie clicked on my own Google Ad and purchased an item.

2 days later when I go into Adords, Tools Analysis, Conversions it still says No Conversions - any ideas where to check next ?

Squeeze Juice Marketing 04-07-2012 06:27 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Yes, check the source code from web browser (Control+U in firefox) of your THANK YOU / RECEIPT page when you do the next test order. See if the code is there.

voodoo1967 04-07-2012 11:26 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Did a test order - receipt / thank you page - yep I see code towards the bottom of the source , I've triple checked the ID and Label etc - they are correct (blanked them out with x here though.

<!-- Google Code for Sale Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = xxxxxxxxxx;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = ""ffffff";
var google_conversion_label = "xxxxxxxxxxxxxxxxxxx";

var google_conversion_value = "18.00";
//-->
</script>


<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>

<noscript>
document.write("<img height=\"1\" width=\"1\" border=\"0\" src=\"https://www.googleadservices.com/pagead/conversion/xxxxxxxxxx/?value=18.00&amp;label=xxxxxxxxxxxxxxxxxxxx5QM&amp ;script=0\"/>");
</noscript>
<!-- Google Code for Sale Conversion Page -->
<!-- /central space -->

So it's definitely there all there - just very confusing why it doesnt show up in Adwords conversions. I ran the test order through as 'phone ordering' not that would make any difference, onOrders it just goes to Queued status.

Squeeze Juice Marketing 04-07-2012 11:37 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
In your code here:

document.write("<img height=\"1\" width=\"1\" border=\"0\" src=\"https://www.googleadservices.com/pagead/conversion/xxxxxxxxxx/?value=18.00&amp;label=xxxxxxxxxxxxxxxxxxxx5QM&amp ;script=0\"/>");

You have a space between &amp ;

Should be:
Code:

document.write("<img height=\"1\" width=\"1\" border=\"0\"  src=\"https://www.googleadservices.com/pagead/conversion/xxxxxxxxxx/?value=18.00&amp;label=xxxxxxxxxxxxxxxxxxxx5QM&amp;script=0\"/>");
May or may not be the cause.

voodoo1967 04-07-2012 11:55 AM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
Must have been where I replaced the code when putting x's in .

I just checked the code and it does say :-
<noscript>
document.write("<img height=\"1\" width=\"1\" border=\"0\" src=\"https://www.googleadservices.com/pagead/conversion/xxxxxxxxxx/?value={$order.order.subtotal}&amp;label=xxxxxxxxx xxxxxxxxxx&amp;script=0\"/>");
</noscript>
<!-- Google Code for Sale Conversion Page -->

I am trying to rule out all things at the moment - on the site in question
when I just had only Google analytics it was setup like this -
I had www.mydomain.com UA-111xxxxx
I also had www.mydomain.com/shop - UA111xxxxx-6

I know Google Analytics is different from Adwords/Analytics .
And in Adwords/Analytics it's definitely setup for the right account ie UA111xxxxx-6

snowboard 05-20-2012 05:33 PM

AdWords Conversion Tracking all coming up as $1 value
 
Hi all,

I installed adwords code from google itself and used {$order.order.subtotal}as the Conversion value, and it didn't track sales.

Then I used the code as suggested here on this thread by Squeeze Juice Marketing, and it tracked the sales, but each value of the subtotal is always $1.

Has anyone seen this or got suggestions as to how to get the tracking to track the actual subtotal value??

Thanks for any help,

snowboard 05-31-2012 11:56 PM

Re: Let's Talk AdWords: How to Install the AdWords Conversion Tracking Code in X-Cart
 
As an update I tried:

var google_conversion_value = "{$order.total}";

and its still not tracking the value...

anyone got adwords tracking to work with x cart?


All times are GMT -8. The time now is 11:42 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.