X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Google adwords conversion tracker XC5 (https://forum.x-cart.com/showthread.php?t=71412)

tls 02-18-2015 07:38 AM

Google adwords conversion tracker XC5
 
I did not find any directions for how to add the adwords conversion tracker in X-Cart 5. But I have learned just enough to pull it off and thought that I would share how I (And Google Tech support) did it.

Google adwords uses a tag added to the success screen to track if clicks they charged you for became sales.
I think they match this with the cookie that they gave the customer so they know what click became the sale. They show you this in the adwords admin area.

You will need the Custom skin Module installed and active in your store.

Go in via FTP and find the file
/httpdocs/skins/default/en/checkout/success_message.tpl
copy it to
/httpdocs/skins/custom_skin/default/en/checkout/success_message.tpl

The en directory is for English language and may be different for your store. You will probably need to create the checkout directory.

Edit the success_message.tpl in the custom_skin area to add your google tag to the end of it.
Mine looked like this:
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/999999999/?label=XXXXXXXXXX;guid=ON&amp;script=0"/>

Go to your X-Cart admin area and re-deploy the store under the System Settings menu at the top.

The reason for doing this in the custom_skin is so that updates to X-Cart 5 don't overwrite it. If the success_message.tpl file gets updated for some reason that you care about, then you would need to redo this process.

BTW. This also lets Google track how many sales your making, and via big data analysis, who your customers are. So if you or your customers are privacy sensitive, don't do this.

Cheers,
Brian

tony_sologubov 02-19-2015 04:27 AM

Re: Google adwords conversion tracker XC5
 
Thanks for sharing this, Brian!

yari 02-04-2016 03:25 PM

Re: Google adwords conversion tracker XC5
 
tls,

I just want to say that I love you. Bus also, you probably used the conversion tracking code adjusted to track revenue as well, could you please share your code? Without the account identifiers, of course. I just want to know which is the variable that you must set up as order value adapted to x-Cart.

What I mean exactly is: in the "naked"" version of the code there is a line:

var google_conversion_value = ##.00;

This line has to be changed for a variable reference so that AdWords can pick up the order subtotal value each time it records a conversion.

Any help on how you did this would be greatly appreciated.

Thanks!
Yari


All times are GMT -8. The time now is 01:43 PM.

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