NEW RELEASE: Simple Google Analytics Version 1.2.2

Written by  March 18, 2008

Version 1.2.2 of Simple Google Analytics (for Zen Cart) now gives you the option to use either the new “ga.js” tracking code (released by Google in December 2007) or the older “urchin.js” tracking code.

The selection is as easy as choosing a radio button in the admin.

This release addresses certain reports widely spread across the Internet by many adopters of the new “ga.js” tracking code Google issued. In those reports users say (and I have confirmed) that results which are provided in reporting (specifically with the ecommerce tracking) are incorrect. In some cases, the revenue figures show as “0” (zero).

I also noticed that the conversion rate was dramatically off under the new ga.js tracking code.

It’s a confirmed Google problem (on their end)

Google has confirmed on numerous boards that the problem is on their end and they are working on correcting it. They hope to have it corrected by early April 2008, but until then, recommend users switch back to the older urchin.js tracking code for more accurate reporting.

This module addresses that recommendation.

It allows you to easily (from within the Zen Cart Admin) switch between the new ga.js tracking code (the default) and the older urchin.js tracking code (to be phased out by end of year 2008 according to Google.)

I installed this new version on my sites (for testing), and now see the proper reporting figures again (*sigh*).

Features of Version 1.2.2

  • Adds standard Google Tracking to website
  • Automatically Adds E-Commerce tracking to website
  • Adds the ability for you to install Google Conversion Tracking
  • Enables you to use either the new “ga.js” code released by Google in December 2007 or the older “urchin.js” tracking code
  • Fully administered through the Zen Cart admin with a simple radio button selection.

How to Download Version 1.2.2
You can download this new version by clicking here. You will be taken to my downloads page where you can select the new 1.2.2 version.

Complete instructions are enclosed in the download to assist you in either upgrading (from previous versions) or “new installations”. Please make sure you read the instructions carefully for upgrading etc… It is easy and straight forward, but you should be aware of a few file changes.

A screenshot this contribution is below for reference:

Simple Google Analytics for Zen Cart version 1.2.2

If you enjoyed this post, make sure you subscribe to my RSS feed!

Related articles other people have read:

Comments

30 Responses to “NEW RELEASE: Simple Google Analytics Version 1.2.2”

  1. Ajith on April 12th, 2008 10:36 am

    Hi,

    Which version of google analytics do you deal with in your book zen cart optimization with analytics?

    Regards,Ajith

  2. Eric Leuenberger on April 14th, 2008 5:48 pm

    The Google Analytics workbook deals with the Urchin tracking code.

    It has not been updated for the new ga.js code yet.

  3. Jen on April 15th, 2008 11:23 am

    Hello,

    I’m working on installing this onto a client’s site and I have some questions. After downloading simple_google_analytics_1-2-2.zip there are several files and directories and the instructions aren’t very clear on what needs to be uploaded into the zen cart software.

    I know I need to upload the files to includes/templates/[the correct template] – am I uploading EVERYTHING to that location including the two sql files and the two directories – admin and includes?

    Thanks

  4. Eric Leuenberger on April 15th, 2008 11:38 am

    Upload everything under the “admin” and “includes” directory. The rest is not needed (BUT you will have to apply the proper SQL patch from within the admin depending on your install.)

  5. Ian on June 11th, 2008 6:18 am

    Hi,
    Just installed your Google Analytics as per instructions to Zen Cart 1.3.7, but the Configuration->google analytics configuration does not appear in Admin. I’ve checked the backend DB and the entries have been created. Any ideas?
    Thanks
    Ian

  6. Thomas on June 24th, 2008 1:04 pm

    i get a blank screen when I install this on zen cart 1.3.8. Only the code appears in the page source, not the body…any ideas? thanks!

  7. Eric Leuenberger on June 29th, 2008 3:07 pm

    Thomas,

    I would recommend reinstalling again from scratch. This mod works on all versions of Zen Cart including 1.3.8 +. I’ve got it running on a number of sites with now problem.

    Typically, when you get a “blank page”, it means that during install you made some type of error in the php side of things (could occur if not careful during install of the lines of code needed on tpl_main_page.php).

  8. Vince LaMonica on July 14th, 2008 6:16 am

    I installed your analytics contribution last week and enabled the ecommerce mode in GA, but I’m not getting any sales recorded by GA. Yes, there have been plenty of sales. 🙂 But GA is not showing them to me.

    Is there a proper support channel for finding out what I’ve done wrong? The instructions were easy to follow and I believe I have done everything they ask of me. Zen Cart is v1.2.7, heavily modified by myself to work with a FileMaker backend [and UPS worldship, member discounts, etc, etc]. But the changes the readme file stated were basic and did not seem to overwrite or alter the meaning of any existing custom code. ZenCart is running on the site I filled in for this comment.

    Thanks for any info you can provide!

    /vjl/

  9. Eric Leuenberger on July 31st, 2008 7:24 am

    Are you using the GA version of the tracking code or the “urchin” version? There is a bug on Google’s side with relation to the GA version that they have yet to correct. It can cause the ecommerce tracking to be off.

    Have you resolved this yet? (Sometimes it takes waiting for Google to update.)

  10. Eric Leuenberger on July 31st, 2008 7:32 am

    Hi,
    Just installed your Google Analytics as per instructions to Zen Cart 1.3.7, but the Configuration->google analytics configuration does not appear in Admin. I’ve checked the backend DB and the entries have been created. Any ideas?
    Thanks
    Ian

    Ian,

    Did you run the included SQL patch? If not you need to run that. If so, it likely did not install correctly. I would recommend re-trying that.

  11. Ian on July 31st, 2008 7:35 am

    Eric,
    All sorted some time ago… needed to enable permission to view GA!
    Thanks
    Ian

  12. Eric Leuenberger on July 31st, 2008 7:38 am

    Super thanks for the clarification Ian. I thought you had it worked out but wanted to make sure.

    For anyone wondering what Ian is speaking of, he is talking about setting the permissions on the Google Analytics (from within your google account) side of things. If you don’t have permission to view the tracking then you will always see “nothing” even if the code is installed correctly.

  13. Ian on July 31st, 2008 7:41 am

    Err.. no, permissions within ZenCart (Tools > Admin Settings… Third Party Mods)

  14. Eric Leuenberger on July 31st, 2008 8:19 am

    Ah gotcha Ian. For some reason when I went back and read the post I thought you were also having problems viewing the “analytics data” (on the Google side). My bad.

    You had problems actually seeing the “menu” option and also have some tool like Admin Profiles installed which requires you to “authorize” the user to view new mods.

    I’ve been in that situation a number of times. Thanks for the clarification and sorry for the confusion!

  15. Vince LaMonica on July 31st, 2008 12:35 pm

    Hi Eric,

    No, the problem has not been resolved. 🙁 I was using the urchin code, but switched to the ga.js version due to the better https support. I may not be exactly clear about what the ecommerce part of your contribution does. We don’t use AdSense. I was under the impression that sales could be recorded [eg: at the checkout process] and handed to the Google Analytics system for tracking.

    The rest of the contribution is working just fine. Should I switch back to the urchin code? Our checkout system is in https, so it does mean some modification to the code to make sure we don’t scare people by having an error in their browser state ‘some of this content is insecure’. I have setup two sites in GA for our domain; one for http and one for https, as I was doing GA manually before by simply putting the urchin code into the template’s footer.

    Thanks for any tips you might have!

    /vjl/

  16. Vince LaMonica on July 31st, 2008 4:48 pm

    BTW, on checkout_success, my body tag has a blank id: body id=””. Is this bad? Using 1.2.7, but it did have zv_onload defined [so I followed step 2 and modified it to what your docs require].

    I guess I will find out in a few hours [EDT timezone here] if Google recorded my test order or not…

  17. Vince LaMonica on August 5th, 2008 12:54 pm

    A quick update; I am using the urchin code and see that you’ve already got it set to handle http and https. I am doing a funnel report, which is working fine, but the ecommerce is still not showing anything. 🙁 The funnel report I had setup on my https profile and just migrated it over [eg: it is the purchase path – shipping->payment->confirmation->purchase made]. It’s working fine, but has even before setting up your contribution.

    I’m not sure what to test on my end to see what’s failing with the ecommerce stuff. I have double checked, and my GA account for this website is setup to record ecommerce. Any tips would be greatly appreciated!

  18. Eric Leuenberger on August 12th, 2008 3:36 pm

    Vince,

    Have you “activated” ecommerce tracking from within your Google Profile as well? You must let Google know the site is an ecommerce site before it will begin to collect data.

  19. Eric Leuenberger on August 12th, 2008 3:45 pm

    Vince,

    One more thing. The Module I created has “built in” http vs. https support even with the urchin tracking code. So, it shouldn’t matter which version you choose, but I prefer the urchin one until Google works out the problems with ga.js version. I like more accurate tracking.

  20. Vince LaMonica on August 12th, 2008 5:08 pm

    Yes, it’s “activated” on Google’s end as well. I did that as the first step when I made your contribution live on the site.

    Re: the http/https stuff; yes, before your contribution, I “rolled my own” and modified the code manually to handle two different profiles. But since moving to your module, I see that it handles it automatically. Back when I started [2006], one needed two different profiles; one for http and one for https, hence the reason I had it setup like that.

    With your contribution and Google’s change in http/https requirements, I’m now able to use one profile which is cool!

    I am using the urchin tracking code until I hear that Google fix the issues with ga.js; I did have it using ga.js for a week in the beginning and ecommerce wasn’t working for it either. 🙁 I must be missing something. I am using 1.2.7, heavily modified [by me]. I need to study how the code gathers ecommerce data better on the checkout/thank you screen so maybe I can see how it is failing.

  21. Doug on September 15th, 2008 11:05 am

    Any update on using the new ga.js code? I have it set for Urchin, but am wondering if it is time to switch over…

  22. Eric Leuenberger on September 20th, 2008 2:37 pm

    Doug,

    No news from Google on whether this has been corrected or not, but I know of a number of people using the ga.js version and still seeing great discrepancies in data reported.

    I am sticking with the urchin version until I hear a definite “yes” it has been fixed from Google.

  23. Hector on September 20th, 2008 4:48 pm

    Hi,

    I have the 1.2.2 mod installed on my 1.3.7 version of zen-cart. I was running the “urchin” code and everything was working fine, until recently I noticed that not all the online transactions were being recorded on Google Analytics. Is anybody else seeing the same problem while using the “urchin” code? I’m pretty sure everything was installed correctly. Like I said everything was working fine until the beggining of September. Any feedback is greatly apreaciated.

    Thanks

    Hector

  24. Josh on September 27th, 2008 1:15 pm

    How does this handle shared ssl? When my customers enter a secure page, the domain changes from http://www.mydomain.com to shared.hostdomain.com/~user/. I would guess this is going to mess up my GA stats? Is there any way to handle this? I am hoping to use the E-Commerce tracking feature.

    Thanks!

  25. Steppi on November 2nd, 2008 5:41 pm

    Hi Eric
    Have just installed your mod & I “think” it is installed properly; I can see it in my ZC admin, my google account tracking status is “receiving data”, I’ve and have read everything there was to read on your site & ZC forum…

    But could you advise me about this:

    I checked GA via Truwex, and get this report & error:

    Google Analytics elements are detected
    Visitor tracking is not OK
    Google Analytics JavaScript file is not downloaded
    Google Analytics Account variable is not found
    ExpandGoogle Analytics WebBeacon is detected
    Google Analytics Cookie is detected

    what should I do about the visitor tracking, javascript file & account variable?

    Many thanks
    Steppi

  26. Eric Leuenberger on November 21st, 2008 2:40 pm

    Not sure what that is seeing, but the easiest way to determine if he code is present on any page is to view the page in a browser and then perform a “view source”. Look near the bottom of the page to see the code.

    As long as you installed the GA module correctly then it should be working.

  27. AirForceOne on June 4th, 2009 4:39 am

    hi, Eric

    Thank you for the nice add-on and I would like to know if it is any different from “Google Analytics by Andrew”. Which one would be more advanced? 🙂

    Regards,

  28. Eric on June 8th, 2009 9:39 am

    Yes, this is different from the Google Analytics by Andrew. I have heard a number of users have problems with the tracking on that one and install is more complex with that version.

    My Simple Google Analytics mod is very easy to install and does not require all the added files to get working. It works flawlessly on both the older legacy code and with the newer ga.js tracking code as well as ads in the functionality to run Conversion Tracking (for tracking Paid Search / Adwords conversion effectiveness) from the admin (which Andrew’s version does not include).

    I can also say with 100% confidence that mine tracks flawlessly and works without a hitch.

    Make sure that if you had Andrew’s version installed, you COMPLETELY uninstall it (and all associated files) before you install mine or you will likely still have problems that carry over from Andrew’s version.

    Any other questions let me know.

    Thanks!

  29. Mike on June 11th, 2009 10:53 pm

    Hi! How do I uninstall Simple Google analytics? Thank you

  30. Eric on June 12th, 2009 8:48 am

    Instructions for uninstall should be provided in the documentation but here is a quick reference.

    1) Remove all files that you placed within your site and remove the line you added to the tpl_main_page.php (there should only be one file that you added).

    2) Run the uninstall sql patch from within your admin.

    All done.

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!