How to Install AdWords Conversion Code in X-Cart

June 14th, 2009

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.

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:

AdWords Conversion Code Settings

AdWords Conversion Code Settings

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

Part II. Configuring the Code

Copy and paste the code into the AdWords Conversion Code Template – downloadable for free (right click and choose ‘Save As’)

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 Squeeze Juice Marketing Template as pictured below:

Configure code for X-Cart

Configure code for X-Cart

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:

Final X-Cart code should look like this

Final X-Cart code should look like this

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.

Enjoy!

Post to Twitter Tweet This Post

Tags: , , , , , , , ,

4 Responses to “How to Install AdWords Conversion Code in X-Cart”

  1. Udhay says:

    Hi,

    I have installed the adwords conversion code as per your guidance.But i think still the conversion tracking not working well..For example:yesterday i got two orders but GA conversion showed only one conversion..Can you halp me how to compare the x-cart & GA conversion??

  2. Ryan says:

    Hi Udhay,

    When you say GA are you referring to Google AdWords or Google Analytics? This tracking script is for Google AdWords only and is not related to Google Analytics

  3. Udhay says:

    thanks for your response..i said about google adwords only. I have set the conversion name as “sales”. It shows the conversions “1″ and value as “$377″ but actually,my cart shows totally 3 orders with price $477. Whats wrong??How to monitor my conversion exactly??

  4. Ryan says:

    Hi Udhay,

    Thank you for the clarification. GA is commonly used to refer to Google Analytics so I wanted to verify what you were explaining.

    Unfortunately without seeing the set-up it is difficult to diagnose. I would suggest the following:

    1.) Time – Reporting isn’t instant, sales can take up to 48 hours to process, so make sure you are comparing from several days ago.
    2.) Code – Verify the installation is up to date
    3.) Analytics – You should be using Google Analytics to track your overall sales and performance, not the AdWords dashboard (the AdWords dashboard is a supplement to Google Analytics). If your 2 missing orders were not from AdWords then they will not show up in the AdWords reporting.

    Best of luck

Leave a Reply