![]() |
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!
|
All times are GMT -8. The time now is 07:37 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.