![]() |
[PATCH] Update to non-legacy Google Analytics code
UPDATED: Qualiteam has an official patch available, posted here: http://forum.x-cart.com/showthread.php?p=212954#post212954
Removed my post content & patch, as it's no longer needed. |
Re: [PATCH] Update to non-legacy Google Analytics code
Nice work intel352. One little thing... Where is the file? Sorry for taking your time.
|
Re: [PATCH] Update to non-legacy Google Analytics code
heh
|
Re: [PATCH] Update to non-legacy Google Analytics code
grrr, I attached the file, it showed the file as being attached. Forum must've barfed :-)
file is there now. and you hush Padraic :-P |
Re: [PATCH] Update to non-legacy Google Analytics code
Hey Jon-
What do you think of this error message? I tried to install using the patch function and got the following: Quote:
I'm on my laptop so i am resolution-challenged and can't get into the diff file easily enough to look at the sql queries... |
Re: [PATCH] Update to non-legacy Google Analytics code
Hi AG9V, looks like it's reading the patchfile incorrectly. is your server Windows or Linux?
Additionally, if you'd like, contact me, I'll help you figure it out |
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
there's no sql queries involved, just an unusual error message :-D |
Re: [PATCH] Update to non-legacy Google Analytics code
Server is Linux.. Red Hat Fedora.. I dont have any more detailed version info than that though...
Thanks for the quick comeback! |
Re: [PATCH] Update to non-legacy Google Analytics code
oh, wait. you applied it via the SQL Patch area. This is a PHP/TPL patch file.
I was wondering why you mentioned queries and why the error mentioned queries. HA. |
Re: [PATCH] Update to non-legacy Google Analytics code
Ah dammit.... I'm a moron... scrolled right past it... Duh
|
Re: [PATCH] Update to non-legacy Google Analytics code
OK, so after making a complete ass out of myself, I successfully patched my installation of X-Cart.
Sorry for the false alarm, Jon... |
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
Just HAD to scare off everybody :roll: That's okay, I'm sure all of the initially scared users will start to creep back to this thread :lol: |
Re: [PATCH] Update to non-legacy Google Analytics code
I do have a question about the GA code that should show after applying this patch.
The old GA code looks like this in my "View Source" Quote:
The new GA code should look like this: Quote:
Is the new GA code what we should be seeing in our pages after applying the GA Module patch? |
Re: [PATCH] Update to non-legacy Google Analytics code
Yes, that looks about right AG9V...
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-xxxxxx-x"); pageTracker._initData(); pageTracker._trackPageview(); </script> Where UA-xxxxxx-x is your GA Account ID check here too... https://www.google.com/support/googleanalytics/bin/answer.py?answer=55480&hl=en_US Regards, Doms |
Re: [PATCH] Update to non-legacy Google Analytics code
After the patch, you should see something like this:
Code:
<script src="http://www.google-analytics.com/ga.js" type="text/javascript"> The difference is that google's original code detects HTTPS, and writes it's url accordingly for the .js file. The google analytics module in X-Cart detects HTTPS in the PHP code, and determines the URL, so that the JS code is simplified. Cheers |
Re: [PATCH] Update to non-legacy Google Analytics code
Thanks for this patch! Works great
|
Re: [PATCH] Update to non-legacy Google Analytics code
One thing that is missing intel that I noticed in the diff is that the new eCommerce tracking code data is not in there.
|
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
Updated original post with new diff containing ga_commerce_form.tpl changes. Really, I don't believe it matters much as the new ga.js file supported the utmtrans method, but this update should remove any doubts. Cheers. |
Re: [PATCH] Update to non-legacy Google Analytics code
If the in product titles or parthner or .... is found " - You need to escape it...
Examples: PHP Code:
|
Re: [PATCH] Update to non-legacy Google Analytics code
qualiteam has an official patch for this as well. Awesome work though thank you for sharing!
|
Re: [PATCH] Update to non-legacy Google Analytics code
bah, if I'd known, wouldn't have gone to the trouble :-)
is the QT patch posted in the forum? |
Re: [PATCH] Update to non-legacy Google Analytics code
Changing the subject slightly... I've enabled my google adwords in admin, and put in my tracking code, and enabled everything !
But still if I load up my shop homepage and view source no google tracking code shows up :( Any ideas why? it's at www.magicshop.biz Cheers All the best Anthony www.magicworld.co.uk www.magiccourse.com |
Re: [PATCH] Update to non-legacy Google Analytics code
Hi Magicant,
Quote:
I can see it. It's the old version code and should still work as intended. When you view your source just do a search for google and you'll see... <script src="http://www.google-analytics.com/urchin.js" bla bla bla pop up. Was it another page you were looking at within the site then? |
Re: [PATCH] Update to non-legacy Google Analytics code
Hi Kube, thanks for the quick reply,
The code is now in it becuase I realised the home.tpl did not have the smarty code for some reason for google analytics. I found a copy on another forum put it at bottom and voila :) Not sure if the conversion / checkout page will work yet.. hopefully i'll get my first order on it soon :) Thanks again, yes I will be updating the urchin.js script soon too. All the best Ant |
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
How can we be sure to know about these official patches? I'm logged into support helpdesk and don't see this patch. Thanks. |
Re: [PATCH] Update to non-legacy Google Analytics code
I had to ask in the support desk and they then emailed it to me and put a link to it in the response. I suspect they are only handing it out on a per request basis as it will be included in the next release (I hope). I also have to say qualiteam used to suck for service, response time and throughness. The last few times I have delt with them they have been great.
-Todd |
Re: [PATCH] Update to non-legacy Google Analytics code
This is what I got...any idea what went wrong:
Status legend: OK - file ready to patch, checksum error - patch contents is corrupted, non-writable - please give those files a write permissions, not a file - the target is not a file, not exists - file is missing, could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually, already patched - file was already patched. |
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
The status legend (which is what you posted here) shows up regardless of if the patch is successful or not. The legend explains to you the result of each file that you tried to patch. For example, file1.php shows a result of "could not patch", you look down at the legend and it explains: "patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually" You need to tell or show us what the results of the individual files are (OK, could not patch, already patched, etc) |
Re: [PATCH] Update to non-legacy Google Analytics code
Thank you very much Jon for the explanation.
I think I've got it installed successfully. Had to check back with the Google analytics again tomorrow. ;-) |
Re: [PATCH] Update to non-legacy Google Analytics code
1 Attachment(s)
I have contacted QT support and they sent me the official patch files, I've attached them to this post as a zip along with the contents of the message they sent in a readme.txt
There are 2 files basically and have to be applied in number order. |
Re: [PATCH] Update to non-legacy Google Analytics code
Thanks for posting that ;-)
|
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
This code is working well? |
Re: [PATCH] Update to non-legacy Google Analytics code
I don't know yet, I've applied the patch without problems and the new Google Analytics code shows up ok, but will need to wait for few days to see if it's working properly.
I have no reason to suspect that an official patch from QT wouldn't work though. |
Re: [PATCH] Update to non-legacy Google Analytics code
can you post your working ga_code.tpl
This is mine, but gives page errors. Quote:
|
Re: [PATCH] Update to non-legacy Google Analytics code
Quote:
This, I wrote myself: PHP Code:
|
Re: [PATCH] Update to non-legacy Google Analytics code
Thankyou,
Page errors have now gone. |
Re: [PATCH] Update to non-legacy Google Analytics code
I can report that GA is picking up data correctly, however I've noticed that with the new code my site no longer validates for XHTML, with it complaining about the new GA code. I've got an outstanding ticket with Qualitool about this and will post back here when I get it sorted.
|
Re: [PATCH] Update to non-legacy Google Analytics code
Hi GeeCee. Which code are you using? As far as I can tell, both intel's and Yurij's code are XHTML valid.
Possibly give us a snippet of the HTML code that is printed out. (excluding Account ID) |
Re: [PATCH] Update to non-legacy Google Analytics code
This is the GA code as seen by View Source on my site:
Code:
<script type="text/javascript"> This is the the validation output from http://validator.w3.org/: Quote:
|
Re: [PATCH] Update to non-legacy Google Analytics code
Adding //<![CDATA [ //]]> within the script should solve the problem. I think this is because there is a script within a script.
Code:
<script type="text/javascript"> Hope this helps. |
All times are GMT -8. The time now is 07:38 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.