| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Google Adwords Conversion Tracking: a how-to on adding code | ||||
|
|
Thread Tools | Search this Thread |
#21
|
|||||||||
|
|||||||||
message.tpl page
I realize that this is the page where we put code for conversion tracking, but It appears that Google Analytics needs a URL that is accessed at the end of an order... I don't think Analytics wants any code to be placed on the page like conversion tracker.
http://www.handicappedpets.com/xcart/customer/main/order_message.tpl is not a valid URL. I understand that the messagl.tpl page is the template for the receipt page - and it looks like the url for the receipt page changes with every order.... which leaves the Thank you page. --------------------------------------------- Further research: Analytics does require code on the page and the URL pf the page (with the code on it) that is the "Goal" soooo, I need to find the temlpate that creates the Thank You page and put the code on that. DO you know where that page gets created?
__________________
X-Cart version 4.4.5 PHP 5.1.6 GD bundled (2.0.28 compatible) MySQL server 5.0.45 MySQL client 5.0.45 Web server Apache/2.2.3 (CentOS) Operation system Linux Perl not found XML parser (expat) found X-Cart directory size 316 Mb |
|||||||||
#22
|
|||||||
|
|||||||
Your post is great help.
It looks we let Google know about every sales on our web site. How can we accomplish to run this snippets only when the customer really comes from Google ads? Probably we need to check some values in cookies. What cookies Google use? By the way, I would create two different .tpl file for your two snippets as they can be used many times in different pages. and would call them like this: <include file="file1.tpl" conversion="1"> <include file="file2.tpl" type="Purchase"> whereever I need change in file1.tpl var google_conversion_format = "$conversion"; change in file2.tpl
__________________
Jay S Xcart 4.1.3 & Mysql 5.0.20 Xcart 4.0.17 & Mysql 4.1 Apache 2.0 & Linux Whitebox 3 |
|||||||
#23
|
|||||||
|
|||||||
Answer to my own question:
Actually there is no need to check cookies. If I put GET parameter into link in Adwords advertisement. That would enough for me to use it in the template using $smart.get
__________________
Jay S Xcart 4.1.3 & Mysql 5.0.20 Xcart 4.0.17 & Mysql 4.1 Apache 2.0 & Linux Whitebox 3 |
|||||||
#24
|
|||||||
|
|||||||
If you use Google Adwords and Google Analytics it already know which ones came from Adwords ads. It is built in - Both in the adwords and the analytics side. I get instant reporting on my advertising ROI.
__________________
--- Patrick Allmond Xcart 4.0.18 Now on a dedicated linux box |
|||||||
#25
|
|||||||
|
|||||||
Re: Google Adwords Conversion Tracking: a how-to on adding code
Has anyone able to get this tested on the X-cart 4.1.X platform yet?
Thanks -Tuan
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9 |
|||||||
#26
|
|||||||
|
|||||||
Re: Google Adwords Conversion Tracking: a how-to on adding code
Sorry to revive an old thread but there are still some unanswered questions for me and others. Since this is a 'completed mod' I think it should be cleared up on whether people have it working and what exactly works.
The code supplied by google to us for the second part is noticably different to what is posted here in the thread. I highlighted what I thought was the most relevant difference. I also noted that the other examples of code use the [img][/img] tags instead of the code I have used with the reference to imp.gif - is this the problem? Code:
I first added the code as supplied by google to the places mentioned at the beginning of this thread. On the final page (order_message.tpl), I got a smarty error at the point I assumed the google message/link was supposed to appear. I then reviewed the code here and added the '{literal}' tags to either side of both bits of code. Now I do not get a smarty error but I also don't see the google link that is supposed to be there on the purchase confirmed page, so I am assuming conversion tracking is not working yet. Anyone have any help or ideas? Would be greatly appreciated. I am a PHP/XCart noob by the way, which may well be apparent.....
__________________
x-cart 4.6.4 RB3 (mystethoscopeshop.com(.au)) x-cart 4.5.0 (4.6.4 RB3 in dev) (economedical.com.au) ReBoot V3 (great xcartmod) Big ups to bcsengineering.com great mods excellent support. Also shout out to xcartmods.co.uk, Firetank and alteredcart.com easy add ons for x-cart makes stores look great with minimal fuss. |
|||||||
#27
|
|||||||
|
|||||||
Re: Google Adwords Conversion Tracking: a how-to on adding code
I keep getting file operation is failed. I've just been going into my admin and going to the template locally. Im pretty new with this stuff anyone know what I might be doing wrong?
__________________
4.0 |
|||||||
#28
|
|||||||
|
|||||||
Re: Google Adwords Conversion Tracking: a how-to on adding code
In 4.1.x I had to use the following for step #7 of the original post, instead of what is posted:
Code:
Without changing the code, the value didn't actually show the order subtotal, it was just blank.
__________________
X-Cart Gold v4.1.10 [unix] AOM, Special Offers, CDSEO Pro, Remember Anon Carts, Back-In-Stock Notifications, MM3, Feed Manager |
|||||||
#29
|
|||||||
|
|||||||
Re: Google Adwords Conversion Tracking: a how-to on adding code
I have to agree that the Google integration on 4.1.8 is not at all straightforward.
I had problems putting the analytics code in - the input screen kept blanking out the code when i pasted it in, and the actual call was missing from the bottom of the template, so I ended up hardcoding it into the template. And with the adwords code, as economedical, i was getting a smarty error. And the code that adwords provides assumes a $1 conversion value, unless you read the help page, which suggests using your total value field. I ended up pasting this code: <!-- Google Code for purchase Conversion Page --> {literal} <script language="JavaScript" type="text/javascript"> <!-- var google_conversion_id = xxxxxx; var google_conversion_language = "en_AU"; var google_conversion_format = "1"; var google_conversion_color = "FFFFFF"; if ({/literal}{$full_subtotal}{literal}) { var google_conversion_value = {/literal}{$full_subtotal}{literal}; } var google_conversion_label = "purchase"; //--> </script> {/literal} <script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <img height=1 width=1 border=0 src="https://www.googleadservices.com/pagead/conversion/xxxxxxxx/imp.gif?value={$full_subtotal}&label=purchase&scri pt=0"> </noscript> copied from this thread http://forum.x-cart.com/showthread.php?t=33607&page=2&highlight=adwords+tr acking, but in testing on xampp, i am not getting the displayed google code. will let you know what happens in prod. (also using aud currency)
__________________
Linux. Apache. PHP 5.2 Site 1 - now xcart 4.4.1 DSEFU, AOM, RMA, Magnifier, Upsells. Heavy mods for Australian postcode validation and extra Aussie payment method. Site 2 - xcart 4.1.11, DSEFU Site 3 - xcart 4.2 Site 4 - xcart 4.3 |
|||||||
#30
|
|||||||
|
|||||||
Re: Google Adwords Conversion Tracking: a how-to on adding code
Yeh let me know how it goes ozchris - still keen to know how it turns out.
Also to update - conversion tracking is now working - just no google link as stated previously.
__________________
x-cart 4.6.4 RB3 (mystethoscopeshop.com(.au)) x-cart 4.5.0 (4.6.4 RB3 in dev) (economedical.com.au) ReBoot V3 (great xcartmod) Big ups to bcsengineering.com great mods excellent support. Also shout out to xcartmods.co.uk, Firetank and alteredcart.com easy add ons for x-cart makes stores look great with minimal fuss. |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|