Not having ANY issues.. Seriously.. My client's marketing team are the ones who manage the GA stuff. They were the ones who pointed out that the ecommerce tracking was missing which is what led me to your module.. They have indicated to me that since I installed your module that everything is working correctly.. To be clear, I am NOT using any of the other Google Analytics modules for Zen Cart, I dropped the GA code that I got directly from Google Analytics..
Last edited by DivaVocals; 6 Sep 2015 at 05:14 AM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Okay for posterity sake.. Here's how I am using this module.. (so anyone following our comedy act here will be clear..)
- I have do not have any of the other Zen Cart modules or plugins installed on this site..
- I have installed your Ecommerce tracking module as per the readme..
- I manually add the regular GA code following the instructions from Google: Add the tracking code directly to your site
Everything works perfectly..
Last edited by DivaVocals; 6 Sep 2015 at 06:00 AM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Well, it *shouldn't* be 'working perfectly' because with this setup, any page where you've manually added the Google tracking code will (in theory) be recording double page hits. Once from the ec_analytics module and another from your manually added tracking code.
Those instructions from Google can/should be ignored - The code snippet mentioned there is inserted into every page on the site via the ec_analytics javascript.
Yes, I know that the google page (correctly) states "Don’t mix up tracking code snippets from different properties, and don’t reuse the same tracking code snippet on multiple domains", which I guess could imply that the 'snippet' inserted by ec_analytics isn't going to contain the site specific information, BUT the only different thing from site to site is the GOOGLE_UA number which is the reason why ec_analytics module needs this to be set on a site to site basis.
The rest of the 'snippet' is identical across all sites.
I would suggest that you do a 'view source' on the site where you are using ec_analytics modules and the manually added tracking code, and you'll almost certainly find two instances of
There will be additional code after this (up to the closing /script tag) that will vary between the two implementations.Code:<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXXX-X', 'auto');
The manually added code will have:
Code:ga('send', 'pageview'); </script>
The ec_analytics added code will have.... and there will be even more additions with the ec_analytics added code on the product info and checkout pages.Code:ga('require', 'ec'); ga('require', 'displayfeatures'); ga('send', 'pageview'); </script>
It is important that you don't have two instances of this:
'cos in theory, Google will be recording a 'pageview' from each instance.Code:<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXXX-X', 'auto'); ga('send', 'pageview'); </script>
Cheers
RodG
If I discover this is the case, How do I remove the pageview recording from your module??
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
If that is the case why would you want to remove the pageview from the ec_analytics module rather than the removing the manually added snippets?
Less long term maintenance that way :-)
Apologies for not actually answering your question. I don't have the ec_analytics code readily available to me at the moment.
Cheers
RodG
ps. Could you pm me a link to the site so that I can check if my theory about the possible double logging is true or not. It may turn out to be a non-issue.
Hey Rod..I'll PM the link.. You are probably right about the double logging.. If you are right, I need to have a think on the solution, and this support thread is probably not the right place to have those musings.. (but if I solve the issue I WILL share my solution in case someone has a similar need).. this site is a somewhat unusual case as I have WordPress and Zen Cart integrated, and had installed your module because while I had Google Analytics tracking working fine for both Zen Cart ad WordPress, it was not capturing the ecommerce transactions.. (hence why I wanted your module)
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
I remember reading in one of the Google sponsored analytics classes (during phase two of the universal analytics roll out) if the same tracker sends a pageview more than once (in a very short time for the exact same tracker properties), the sebsequent calls are ignored. When more than one tracker is created using analytics.js, unless the tracker name is explicitly specified the "default" (usually first) tracker is used to send the calls.
Of course that was along time ago in computer years (and I can no longer find the source material), so the above may not hold true. Best solution (as both of you have mentioned) is only create one tracker and send only one pageview.
Last edited by lhungil; 8 Sep 2015 at 03:39 AM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Bookmarks