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.


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

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