Thanks for your help econcepts. I got the mod to work. Is is possible to add the code to the home page? It's flash
Printable View
Thanks for your help econcepts. I got the mod to work. Is is possible to add the code to the home page? It's flash
I would like to install this to track the ecommerce conversion rate from adwords.
However, I do not use the standard zen cart checkout method, I only use google checkout of which does not communicate with zen cart because I allow them to checkout without creating an account on my website.
Therefore my stock totals don't subtract, or orders go into the admin.
Is it still possible for me to track adwords conversion with this mod? What page would I use for checkout success, response handler?
I have google analytics installed right now, but it shows $0.00 for ecommerce, I have not set any goals or anything.
You can still track AdWords conversion IF (and only IF) you have access to (as in able to modify it) the "thank you page" the user is taken to after a sale.
If you have the ability to do that, then all you have to do is insert the Tracking code that you'll find under your Adwords account (not in Zen) onto that "thank you page" and you should be good to go.
If your thank you page is the Zen Cart "checkout success" then all you have to do is turn on Conversion Tracking from within the Zen Admin and enter your conversion tracking ID in the space provided (again, in the Zen admin).
I'm seeing this - as well as orders with missing items (both in the 0 total orders and the non 0 totals)
can't find any rhyme or reason for it
one thought - if the user clicks away from the checkout success page before the javascript has had chance to comlete (slow connection??) would that cause the problem??
Regards
David
I don't think that is the case at all. Once that page loads, it records. Until Google released the new "ga.js" version of code, everything seemed to work fine with many clients I use it on.
Once that code was released I began to see a number of users across the Internet reporting this issue as well. I can't be sure, but am feeling it may be a Google issue. Recently, one of the client sites that was incorrectly recording data began to properly record it again without me making any changes.
I am running zc 1.3.8a and MySQL 5.x
I read the installation instructions for a new install and followed them - I thought.
I installed this S-G-A mod, using the Tools > Install SQL Patch to install the mysql file, browsed to your .sql file on my HD and clicked Upload.
I then went to Admin > Configuration > Google Analytics and set things up, putting in my GA code, etc.
I see Adwords clicks, but I get no records in my Google Analytics reports. Is there something more I need to do with the mysql patch? When I "uploaded" it nothing appeared in the ZC text area that is labeled "Enter query". Was I supposed to do a copy/paste here? I know nothing about mysql queries.
Jack
Ref: http://artbeautiful.com
Correction:
I used the term "GA code". I should have said GA account ID, which I pasted into the Config > Google Anaylitics setup. I have no idea which version of the code your mod grabs for my pages.
Jack,
A few things to note.
1) It is sometimes best to "copy and paste" the SQL patches into the Admin interface rather than upload files (which in the past have been shown to be rather shaky at times).
2) Seeing Adwords clicks does not mean you have the module installed. Adwords clicks are tracked from the GOOGLE side and triggered when a user clicks on your ad). Integration between Google AdWords and Google Analytics is what can happen with my mod (so that the Adword data shows in your Google Analytics reports).
3) Did you add the line of code to your "tpl_main_page.php" file as listed in the installation? I looked at your site, and the tracking code is not showing at the bottom of your pages. This means that you skipped Step 3 of the installation instructions which mentions that you need to add the following lines of code to the "tpl_main"page.php" file:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
If you perform #3 above, I think you'll get it all working. :)
Thanks.
I'm asking the following for the benefit of others and because the reports are only generated once a day. I pasted it in the tpl_main_page.php just before the </body> tag, correct? So, a live page now shows this at the bottom (my UA id hidden here):
Code:<!--eof- site copyright display -->
</div>
<!--bof- parse time display -->
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<!--eof- banner #6 display -->
<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-XXXXXXX");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>
Sorry, tried to add this to the previous, but the editor froze.
How would I check to see if the mysql patch uploaded correctly?
I'm feeling especially dim right now.
Been working with this for hours now but google still says tracking not installed.
But i can see it in the page source! What is it that either google or i are missing?
The page is at www.napavi.no/shop
Anyone feeling bright?
elhauk
I'm having my own troubles, but I do know Google update the results only daily. I frankly don't remember if the "√Receiving data" shows immediately or not. Someone else will have to answer that. I also see you have not placed the php code (reply #613 ) at the bottom of the tpl_main_page.php file.
I like your design.
econcepts:
My problem is that I have added the code as you recommended in post #613, I see the Google Analytics code in my page, and I see √Receiving data in my GA dashboard, but no visitors are registering in the reports.
In phpmyadmin, I see the table, google_analytics_languages, in my database, but that's all. Is there more I should see to confirm that the Simple-Google-Analytics patch is in place?
elhauk:
I'm having my own troubles, but I do know Google update the results only daily. I frankly don't remember if the "√Receiving data" shows immediately or not. Someone else will have to answer that. I also see you have not placed the php code (reply #613 ) at the bottom of the tpl_main_page.php file.
I like your design.
econcepts:
My problem is that I have added the code as you recommended in post #613, I see the Google Analytics code in my page, and I see √Receiving data in my GA dashboard, but no visitors are registering in the reports.
In phpmyadmin, I see the table, google_analytics_languages, in my database, but that's all. Is there more I should see to confirm that the Simple-Google-Analytics patch is in place?
If I copy/past the patch into the /admin area under Tools > Install mySQL patches, will it overwrite what is there, and how should I open the data to copy it without losing any important formatting?
Thanx for compliment and advice JackA
Obviously the Recieving data takes som time to update. Should maybe be some kind of warning in the installation file saying; "patience young padawan, if google doesnt register your site, leave it till the next morning before you post a hysteric complaint..."
I am upgrading to the new 1.2.1 on ZenCart 1.3.7. Simple Google Analytics has been installed and working since December, but I am getting an error when I run the upgrade sql patch for the new one. These are the steps I did:
1) uploaded google_analytics.php to:
includes/templates/cherry_zen/google_analytics folder.
2) opened includes/modules/pages/checkout_success/on_load_main.js and determined "javascript:__utmSetTrans();" was the only line in the file, so I deleted it from the directory.
3) copied the googleanalytics-UPGRADE.sql contents into the SQL query executer and hit "SEND"
4) got the following page:
1062 Duplicate entry 'GOOGLE_CONVERSION_ACTIVE' for key 2
in:
[INSERT INTO zen_configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('', 'Activate Conversion Tracking', 'GOOGLE_CONVERSION_ACTIVE', 'No', 'This element enables you turn on or off Google Conversion Tracking.
Please Note: Conversion tracking is used to track the effectiveness of Google AdWords paid search campaigns. If you are not running any paid search campaigns, then you should leave this set to "No".
If you are running Google AdWords (paid search) campaigns, then turning this on will place the proper conversion tracking code on your checkout success page and enable you to start tracking conversions.
Turning this on requires you to enter your unique Google Conversion Tracking ID in place of the "XXXXXXXXXXX" number shown in the next section.
For more hints and tips on how to use Google Analytics to increase sales from your store, visit ZenCartOptimization.com
Do you want to turn on Google AdWords Conversion Tracking?
', @t4, 5, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''Yes'', ''No''), ');]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
I've double-checked the location of the files and tried running the query again with the same results. The only way to exit this page is the "back" button or close the page.
website: flagstore.flagsbay.com
OK, I notice that the Google account ID and the Google account number are slightly different. The ID is UA-xxxxxxx but the account number for a specific url is UA-xxxxxxx-x, I suppose because I am tracking several sites.
So, I went back to Configuration > Google Analytics Configuration and added the -x at the end of the account number, which was not there before. Was this the problem? It appears I can't find out till tomorrow.
I am trying to install this Google analytics as new, but i am confused...
"1. After you have identified the directory that your template is running from and determined where you will be uploading the files to,
upload the included install files and directories to your zen cart site."
Upload which of the many files and directories? To which one of my custom templates.....? I have a few custom templates, or is that wrong?
Jack,
You did not enter your Google Analytics Tracking ID number. That is why you are getting no results. See the highlighted area I have above (in red).
That number needs to be YOUR number and is configured form within the admin of Zen. You get the number from within your Google Analytics account itself.
Right now all you have is the example data of "UA-xxxxx-x". You need your number in there for it to work.
Jack,
See my previous post. On this topic. You still have not entered your actual tracking id number that Google gives you when opening a Google Analytics account. You are trying to track your site stats with a "sample data bit" (that being UA-xxxxxx-x). It needs to be your unique tracking id that Google assigns you.
bsp,
You upload everything you see in the install package with the exception of the "readme and sql files". Those are not needed.
Where you see "your_template", replace that with the actual name of the directory you are using to run your CUSTOM template from. This will activate Zen Cart overrides as needed.
So if your template directory (for your custom template) is called "bspsite" then you would need to add the files and directories found under the "your_template" folder to the folder on your server called "bspsite". An easy way to accomplish this is to simply rename the folder called "your_template" to "bspsite" BEFORE you upload anything.
Then, just drag and drop the files up to your admin directory and your all set. No overwrites to worry about.
Also, don't forget to follow STEP 3 and install the SQL patch after uploading your files.
Larry,
since you were running a previous version that already had conversion tracking etc.. in place, you did not need to run the update (doing so should not hurt anything though).
All you had to do was copy the new files to their respective locations, and you should be set.
How are things looking after you do that.
The error you are getting when trying to run the SQL patch simply means that there was already a value in the configuration table which was identical to the one being inserted and you can't have two of the same values within that portion of the table.
Hope that helps.
Update: I am now getting reports, so to whomever is having the same problem I had, be sure to note the the GA "ID" is only part of the GA "Account number"
So, in Configuration > Google Analytics > Edit > enter the UA-xxxxxxx-x account number.
I have not yet had time to check the reports for other possible problems, but at least I am getting reports of visits.
Eric,
sales that happened after the GA module upgrade (and getting the message above) are not showing up in Google Analytics today. Do you have any other suggestions for me to try?
Eric,
An Update: the analytics part is working (yesterdays traffic is showing), but the ecommerce isn't registering. I'm having a strange issue with the orders page working on a different thread. Sales complete, but on the orders page I'm getting an error, all other pages display correctly.
Could these be related?
Larry,
Have you told Google you are an "ecommerce site" yet? It won't track ecommerce transactions unless you set your account to an "ecommerce site". This is done from within your Google Analytics account profile.
What is the error message you are getting on the checkout success page? I doubt it is related to this, but it is worth a look.
Yes, the ecommerce tracking was working before the upgrade and subsequent error. I did just log in though to confirmed it is still set up correctly.
The orders error is on the screen capture. I haven't been able to confirm, but I suspect this error is due to Google Checkout. It all works from the customer facing side, but I get this error trying to access the order page.
The other odd bit on it, only the latest order shows up. nothing else. To see other orders, I have to go to the customers page, click order and the single entry comes up with this same error message.
btw, thanks for a great piece of work with the Simple Google Analytics package. Other than this glitch, it has worked flawlessly.
Hi,
First off thanks for a simple and easy to use product. It tracks everything perfectly.
I have a question about a tweak I am wondering about.
We own a store in which we sell downloadable products. Every day we give away a free download through the store. So these downloads register as a sale and show up on the ecommerce reports.
As you can imagine this skews the average order value as well as the conversion rate.
Is there a way to tweak it so that any $0 sale would not be included in those reports?
Thanks
Rick
My Analytics results were never quite right. I had entered the analytics code manually at first, then later added the contribution.
I just went back and cleaned out all the old junk and completely uninstalled and reinstalled the contrib (because I did not know which version I had)
Site visits and related stuff are showing fine, but after three days, I am showing zero sales under ecommerce (actually had over a dozen).
I think I may have entered the wrong number for the "Google AdWords Conversion Tracking Number"
How many digits should it be and exactly where do I fon it on the adwords site?
Thanks!
I did a new install per the readme file. But it does not seem to be working. When i check the status on the goggle side, I get this message
Tracking Unknown (Last checked: 2008-02-19 1:41 PM PST.)
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.
I am not sure of i did the database update right. I went to tools/install sql patches. I copied and pasted the sql patch file intoo the window and clicked send. It seemed to work.
I did the tpl_main edit per the readme. I put my account number in the admin setup.
Do I need to add the google code snipit somewhere?
The code snipet has my account number as UA-######-2. It put it in like that but but it lists my account number without any -#, only UA-#####.
I am not sure how to trouble shoot it now.
I have mine set up as UA-xxxxxxx-1 and I am collecting everything as far as I know.
Rick
well it seems to be working now. I changed to -1 and now it says "receiving data" so i don't know if it fixed itself or changing to "-1" fixed. Anyway, thanks.
MR
www.essential-stuff-store.com
only one website and less than 24 hours on analytics so no data yet so I can't tell if the data makes sense. I'll play around with -1 and -2 and see what happens. Thnaks for the tip.
The "Google AdWords Conversion Tracking Number"
How many digits should it be and exactly where do I find it on the adwords site?
Larry,
This type of error looks like you did not complete an install of some type of product or contribution you may have attempted to use (not related to the Simple Google Analytics module).
My module doesn't change or alter anything with the order class or files. So I would step back and look at any other contributions you may have tried to install (or upgrades) and make sure all the files associated with those are installed.
This is a classic error message showing that files somewhere are missing (including the language file for what ever contribution this refers to).
Hope that helps. :)
If you wanted to do so, you would have to program an if then statement to eliminate the products with "$0" as their price. But I highly discourage and do not recommend that.
Is there another way you can give away the free downloads (outside of the cart)? Why run it through the cart process if it is free? I am not familiar with your business yet, so that may be a question you can answer, but it would seem to me that if your item is a free giveaway (in reality) then you provide it to them outside of the realm of the cart.
Does that make sense?
A few things to note that will answer your question:
1) The Google Conversion Tracking number does NOT have the "UA" in it. That number is reserved for Google Analytics itself (conversion tracking is another item entirely). The conversion tracking number you are looking for is formatted as such "xxxxxxxxxx" and usually (but this can change) includes an 11 digit number with no spaces, dashes, or letters.
2) You get your Google Conversion Tracking number from your Google Adwords account. Found under the "Conversion Tracking" tab. Follow the on screen prompts.
3) If you are not running a Google Adwords campaign, then you do not need the Conversion Tracking number. You can still track conversion within your Google Analytics account (as it relates to the e-commerce portion .. not the Adwords portion.)
4) Make sure you activate your site as an "ecommerce site" from within your Google Analytcs account profile. If you do not do this, your ecommerce tracking will always show "0".
5) Make sure that during your "uninstall" and "reinstall" you did not leave any manual alterations in place that may be conflicting with the install. Overlap of the two can cause problems.
The Google Workbook in my signature has very detailed screen shots of this whole process (and more) that many have found helpful in getting it all setup and working together. You may want to take a look at that as well.
The problem is you have not configured Google Analytics to work with your actual tracking id number. The "UA-xxxxxxx-x" number is for sample purposes only (to demonstrate the format of the number you should plug in.)
Using that will not track anything.
You need to get the actual Tracking number Google provides to you (found within your Google Analytics account) and plug that number in place of the sample one.)
Doing that will cause Google to see the code properly (providing you installed the module correctly) and you should be ready to go.
Be sure you're using the correct number. Just changing the "1" to a "2" and vice versa will not help.
You need to find the actual analytics number that Google provided to you (for the site you want to track) and copy that out of your Google Analytics profile into the configuration area within the Simple Google Analytics zen admin.
To econcepts...
I didn't actually put UA-######-2 in the settings. I used the actual number. I just left it out of my post.
My confusion is over what comes after the the second "-"
I guess there is no harm in using the real numbers. At the very top of my Analytics page, is an account number:
UA-2249671 (note there is second dash or trailing number).
But in the code snipet it appreas as:
uacct = "UA-2249671-2";
I entered UA-2249671-2, but when i checked my connection from the google site, the response was "no code detected". So I believe I did the setup right.
So I changed it to UA-2249671-1 and when I looked back to the connection test it was now "receiving data".
I have a feeling the "-1" was wrong because after a full day of data, I have nothing in the reports. I think maybe the intial probelm was one of those time-delay, server things where a new account tales a while to be recognized.
Anyway, I am back to "-2" it still says "receiving data" so I guess I'll know in 24 hours whether I am actuall getting data.
Sorry if this seems confusing.
Click Campaign management on Adwords. Click conversion tracking. Click "get conversion tracking code" make some radio button choices about color and format and type of conversion tracking. The number is buried in the code snipet.
That seems to be the only place to see it. I had to go back through all those steps to find mine again.
ever since I update to 1.3.8a my analytics isn't showing any visits? any ideas on how to get this back? I have my account information setup and it used to work fine, but now... I see no visits in my GA account...
Thanks for looking at the error message, Eric. The only other installation I have done is Google Checkout and I suspect it is somehow the culprit. I'll have to uninstall it and see if it fixes the problem.
However, since installing the Simple Analytics upgrade, eCommerce is definitely not working. I'm still getting traffic results, but no sales have registered since the upgrade.
I have double-checked my GA settings making sure they didn't somehow reset to default and ecommerce is still activated. I've looked back through the installation process and other than the "error" I copied in on page 63 or 64, it all seems correct.
Do you have any other ideas I could try. Thanks for all the help.
http://midwestapplianceparts.com
changed some things and mods, but nothing that I think should affect this... thanks for your help :)
I also just noticed that under admin > configuration I have both google froogle config and google base config.... would this mess anything up? how do I remove the old froogle?
thanks
I'm having a ton of issues getting this google analytics thing to integrate into zen cart.
my head is spinning, i can't look at this anymore. :)
I'm wondering if I can hire someone to fix up my analytics tracking and make a few adjustments to my checkout system. the site is for an upstart clothing company.
if anyone knows someone affordable, please let me know.
thanks
ryan
I feel your pain. In the end, I think mine installed without any problem but I thought I had a problem because it didn't work right away. My best guess is it took Google sometime before their servers recognized the code. If you just setup your analytics, wait several hours (or more) and then see if it starts saying "receiving data" on the google side. Make sure you have the entire number copied out of the code snipet you see on the google side. It should look like "UA-somenumbers-number". Mine is UA-2249671-2 for example. You can see in my previous posts where I started playing around with the last number because it didn't seem to work right away. I just didn't wait long enough. Even after its working, it takes 24 hours before anything shows up in the reports and they only update once a day.
A simple test to see if you installed the module correctly is to view your own home page in a browser, then go up into the browser menus and click View/Source.
The Google code snipet should appear in the page source code near the bottom. It should read exactly like the code you see on the Google setup. If the code is there, looks exactly the same, and the number is right, just let it be for awhile.
If the code is not there when you View/Source, then you have an install problem.
Hope this helps. If you post your site URL I can look and see if the code snipet is there.
Mark
www.essential-stuff-store.com
Apologies if this has been asked and answered already but my best efforts at finding an answer on the forums have failed.
Does anybody have any suggestions on how to account for cancelled orders and sales in Google Analytics? Is it possible to report back on that data as it can make a material impact in the reporting.
Ideally I'd be looking for a solution where the ZenCart module could report such cancellations once an order's status is changed to cancelled but I would be interested in hearing other methods directly dealing with GA as well.
Thanks,
Armen
My webstore is
www.homageclothing.com/store
at the end of the code there are several instances (maybe 3?) of the tracking information.
i have no idea why they are all there. i'm not even sure which file to modify in my zen cart installation to remove some of those instances.
any ideas?
another problem i am having is my checkout process. i disabled the login functionality to go for a simpler checkout. my new setup has 5 steps. i want step 1 to be billing information, step 2 to be shipping information, etc etc. It does this wacky thing where the shopper can't seem to have separate billing & shipping addresses.
what a pain in the a**!
thanks for your help.
ryan
Ryan,
First, I am no expert and struggling along like the rest of us. I took a look and I see the code showing up twice on some pages and none on other pages. I would think that if your Google Status is receiving data, and the account number matches then you should be getting something. However, your site looks quite different from the basic zencart so perhaps you have changed some files to the point where the plugin is not working. Your change to the login process sounds like that sort of thing. You might need to start with a fresh install, add the modules you want to use, test everything, and then slowly make your changes, re-testing at each step. I think you may have over-hacked your cart.
Hi,
First off...thanks for the mod. Installed without issues on my test server and it's great to be able to add ecommerce tracking so easily to my site.
One tweak I'd like to make...I'd like to have ecommerce reporting on the manufacturer of my items sold as well. I don't think Google Analytics lets you add new variables to track, and I want to keep tracking the product name and category. So I figured the easiest way to do this was to concatenate the manufacturers name to the product name (separated by a dash).
Any tips on how to do this? As a PHP programmer I'm mediocre at best but from a db side it's a pretty straightforward query...
SELECT CONCAT(m.manufacturers_name, " - ", pd.products_name) as products_name
FROM products_description pd, manufacturers m, products p
WHERE p.manufacturers_id=m.manufacturers_id
and p.products_id=pd.products_id
Any help appreciated.
thanks,
Don
Just a quick FYI. This item has been fixed. I went in and corrected the error which was, as suspected, the result of a mis installed contribution. Everything is working as should be now.
This has to be an installation error. See my above reply.
The only time you get this error is if files are missing during install.
Having both the Froogle and Google contributions in place should not affect each other (they are separate entities all together).
I tried to run a test transaction, and got all the way to the point of submitting the order.
Analytics was in place there.
What page are the users taken back to after processing? That will be key here. Is it the typical (checkout success) page or a different one?
Google Analytics does not have the capability to actually "subtract" orders that were returned. It is not native to the analytics program.
Typically you have to keep this info at hand and figure it in when calculating your true conversion rate.
If you want to try to subtract the amount from what Google reports, you might want to try to send a "new order" (refund) to through the cart that then in turn sends a negative value (equal to the original order value) to the eCommerce portion of the analytics.
Keep in mind that doing this though would require some additional programming, and it would still not address the "conversion rate" issue (that would remain unchanged as you can't reverse it once it has been recorded).
It would only reduce the dollar amount (revenues) reported through the eCommerce tracking portion of the analytics (which again, probably won't help much for decision making.)
Ryan,
First thing to clear up. You only want 1 instance of the tracking code on your pages (not multiples). That will do a number on the tracking reports (and one you don't want to mess with).
Secondly, it sounds like you have made a multitude of adjustments to your cart that make me think there are a number of files that are causing problems (across the entire site).
As mentioned by another zenner in an earlier post, I would recommend you start with a fresh install of the cart and go from there. If you have customers and orders from the current version, you can migrate them (Import / export) from the current install to the new one. If not, then you're in luck, and the new install should be a breeze.
I personally don't think it is always a good idea to try to fix a potential bad install or corrupt files. Sometimes, it is ok, but in others where it looks like a lot of damage could be done, I recommend a new install.
After all, do you want to risk something happening down the road when you start to see more sales and customers? I would think not. One way to start down the path of success is to build a strong foundation. It's one of the first steps toward building a solid business.
Don,
If you are going to do this, I would recommend only doing it near the portion of the code that pulls the data (within the google-analytics.php file) for the order. Most are in arrays. You'll need to pull the needed data form the array, probably run yoru own separate query on the db and then combine the two as you insert the product name into the analytics tracking.
Since you are looking at this for analytics purposes only, I would highly recommend against performing the task anywhere other than in the google-analytics.php file (but be careful in there not to mess anything up as well or you could render your entire tracking system as unusable.)
If I were trying that, I would leave the current code as is, then run a totally separate query (new one pulling the manufacturer name if not already present) and then create a string that combines the two elements with the dash ("-") between them.
Hope that helps!
I was about to download this but is the version correct on the download page?
Zen Cart™ Version: v1.3.6
Version: 1.2.1
Last Updated: Jan 21 2008
Author: econcepts
Shouldn't it be for v1.3.8 ?
Hello,
I am having trouble getting any results after installing this mod. I first tried google analytics by Andrew since it was for v 1.3.8 and I got results but I soon found it causes the dreaded secure and non secure popup when people log in because of the javascript containing references to a non secure example site. So I uninstalled that mod and installed simple analytics to the memphiscandle site. I have uploaded the files and configured the admin. My google analytics account is e-commerce enabled and at this time it says it is receiving data but that can't be correct since I am not seeing any analytics results. It has been 5 days since I installed simple analytics and I know I have had traffic.
Do I need to install the javascript from google to any of the files?
Any advice will be greatly appreciated.
I have done a fresh install however i don't see the link under config in the admin side, the SQL loaded correct and all the files are in the correct locations
Hi there,
I've had the same problem for months now. Everything I try seems to fail.
I get some goals recorded and some sales conversions (ecomerce goals).
But it does not record all sales and other goals. If you get a answer to this please post it here.
Or if anyone knows the reason why this is happening?
Thank you!
Since adding simple google analytics to my site in late January, I've been seeing the funnel conversion count (for checkout success) show only around 20% of the total successful purchases. I just started researching what might be wrong... It looks like IE6 versus IE7 percentages of browsers are similarly represented in overall site traffic versus funnel conversions. However, IE/Windows is significantly *underrepresented* in the conversions versus the overall traffic as compared to other platforms, so the problem seems specific to that browser/platform.
While I'm not sure if it's related, I did notice that a zenid querystring parameter is sometimes added to the browser URL on the final confirmation page. I wonder if that's causing the defined funnel success URL to not match against the browser URLs when they contain this (i.e. if substring matches don't count). I just tried adding 'zenid' to the list of parameters to ignore (in the google analytics settings online)... I'm hoping that resolves this (but will have to wait to find out).
If that's not it, then hopefully this reply at least adds something to the discussion in terms of the ie/windows possibility -- maybe there's a common IE/win configuration or security tool that blocks part of the necessary request from being made?
Hello Gang,
I'm wondering why I couldn't just take the code generated on the Google Analytics site specifically for my site and paste it to the bottom of
tpl.main.page.php
I'd like some idea of why I have to load configurations into my database and run scripts I don't understand. Google makes no mention of the need for that.
By the way, I want to thank "econcepts" for the wonderful insights he brings us . "20 Surfire Ways to Increase Sales" is a great read.
Hi,
I am trying to get this mod up and running on www.lakeslampshades.com.
I have downloaded the mod and uploaded the files, following all the instructions (SQL, edit tpl_main_page.php, etc.); however, the tracking code is not displaying when I view the source of my home page. Any ideas? Something must have gone wrong in the install, but I have double checked everything. I am running ZC v1.3.8.
Thanks in advance for any help,:blush:
Nate
There is an uninstall for this mod (Simple Google Analytics). It should be in with your download.
It should be a very easy install though. Only a few files (2) to upload and you're all set. If you couldn't get it working, make sure you completely uninstalled your previous version (Andrew's) as that can cause issues.
Once that is un-installed, this onee should go in without a hitch. Providing you use the correct Google Analytics ID, you should see results next time Google updates.
Glad you liked the 20 Ways book. There is much more on the way and a "surprise" I have been working on that I hope to have running by end of April that I think you all will enjoy.
To answer your question:
If you just copy and paste the info Google provides to you into you rtpl_main_page.php file then you will not (unless you hard code it) have the e-commerce tracking or conversion tracking (in the case of Adwords).
The reason you have to install configurations is to get the mod installed and working from within your Zen Cart admin (to take advantage of a number of things).
To work within the framework of Zen Cart, and to have the most effective use of the module I simply took what Google shows and converted it into a format that can be manipulated from within the admin with little effort.
Hopefully that answers your questions. :)
Make sure you follow Step #3 (in the readme). It mentions adding a bit of code to the bottom of the tpl_main_page.php.
I see you said you did that, but make sure you edited the proper file (the one that is under the directory for the template you are using mainly.)
If you edit the file in a different template directory, it will not insert the code in the footer as needed.
Update on various reports of missing revenue figures
We've all heard reports of the missing revenue figures and what seems to be potentially incorrect tracking figures with the recent Google "ga.js" tracking code.
I've been researching it and finally came across a thread where a member of Google admits there is a problem on their end.
The thread on the internet reads as follows:
The Google Analytics Adviser responds with the following:Quote:
My two biggest issues right now are not AdWords related - they have to do with custom filters that stopped working on January 15th, and ECommerce revenue numbers not matching up properly (new code) - some transactions have NO revenue at all, some are missing products too. Looking at the Google Group, we're not the only ones with these problems, and my clients are rather upset, because they've gotten used to making some decisions based on GA data. I know it's free and everything... (although these clients are longtime AdWords advertisers) but we were kinda hoping it would be accurate as well. But it seems like there's been this huge silence about these issues - nothing officially has been said. We sent all kinds of screen shots to support, set up sample transactions, etc etc and then never heard anything back.
So after reading that, I decided to rework the current Simple Google Analytics contribution to include the option of using either the urchin.js tracking code or the ga.js tracking code.Quote:
I've spoken to the team about the issues you are experiencing.
If possible, please write in to the Analytics Support team (via the contact link in Analytics) with specifics on the filters. We haven't noticed anything specific to filter setups in the past few months, but are eager to take a look into it.
As for the ecommerce problems, we've confirmed received reports that in rare circumstances ecommerce data is not being recorded properly when using the newly released ga.js code. We are in the process of addressing this issue and plan to release a fix by the first week in April. However, the older urchin.js is not affected by this issue, so if you are having this problem, you may wish to consider switching back to urchin.js for the time being.
This way you can use the urchin.js code until the fix comes out from Google and then easily switch to the new "ga.js" tracking code from your admin (simple as selecting a radio button).
I have this contribution complete and tested it on my site(s) last night. Once the new data is reported back and I confirm it's working, I'll upload to the Zen Cart downloads section.
Just wanted to give everyone the heads up.
Hello. I just installed this. I am not getting any errors. I changed my tpl_main_page under my custom template like I was supposed to. I have viewed my source code on my main page, and yet google is still saying not installed. Could someone help please? Thanks.
Christine
Oh and by the way, there was no dash at the end of my google id number, I have tried adding the dash before the last number and nothing seems to happen.
I'm unable to download the ZIP file for some reason, but it's just as well since you're getting ready to post an update. Can't wait to try it out. Thanks, Eric! :clap:
Eric - Let me first say "Thank you" for all your tips, coding, writing, trouble shooting, on and on and on! I really appreciate all your knowledge. After reading both the 20 tips and GA Uncovered I'm stumped on a few things... First, I'm guessing that part of the issue is that I'm using "Starter Edition" of AdWords and wonder if that's why I don't see an AdWords conversion Tracking number to enter into Simple GA for ZenCart. When I log in to my AdWords account, I see in the browser's address bar "campaignId=9591837" - is that my tracking number? Looks like it's too short but I've looked high and low following the messages here and don't find the number referred to in my AdWords account. Secondly, when I configure my funnel following the section in "Uncovered", the screens I see are somewhat different than the screen shots in the book. Analytics now says to make sure you don't have a domain name as part of the step - That is, use /index.php?main_page=product_info instead of https://www.domainname.com/index.php...e=product_info
When I do a Funnel Visualization, everything is abandoned at the first step (Product Info) even on orders I've completed. I know there are issues with the new ga tracking and have followed all those messages, but I suspect that my problem is my two domains... I have http://www.remarkablepens.com and https://secure.remarkablepens.com. I saw the tech note "How do I install the tracking code if my site spans multiple domains? " and can find the spot in includes/templates/CUSTOM/google_analytics/google_analytics.php to slip in the first bit of prescribed code, but I'm not knowledgeable enough to finish the part about the _link and whether or not ZC uses forms to send information between domains.
I'd appreciate what ever help you can offer! My site's addr. is show below, my version is 1.3.7.1 and I'm using the 1.2.1 version of SGA
Thanks again,
Mark
Heh, actually, that was MY thread on WebmasterWorld. How odd to run across the quote somewhere else.
Yes, they are still telling me the problem with the new code is not resolved, but we're also having problems with the old code as well. In fact, I just submitted another support request because we noticed some transactions in Zen Cart were missing from GA. Now I'm wondering if I have to go back and check EVERYTHING from the last eight or nine months. I'll just cut and paste here:
Haven't gotten an answer on this one yet.Quote:
[FONT=verdana]In this case, the client wanted to figure out how many of a certain product he'd sold over a time period, so he could plan how many to stock. He's running Zen Cart. Zen Cart told him that he'd sold 59 units of this product, but Google Analytics shows only 49 over the same time period. We were scratching our heads over this one, so I did a dump into out of Zen Cart and into Excel of all the orders with this product; then I did a dump of all the transactions from GA with this product, and compared them. Nine transactions were missing entirely. Two of them can be explained away by Paypal (he added that payment method last month and we haven't gotten to where we can track Paypal orders in GA yet) But the other seven - no idea what's up with those. I went back and looked through each of the missing orders, and I can't find any common denominators - in some cases, the product was ordered alone, and in others, it was ordered with other products. All were authorized credit card orders. It's such a big percentage of total orders that now we're really starting to get a little nervous. [/FONT][FONT=verdana]This is with the OLD js code. [/FONT]
The code looks to be installed correctly on this.
Typically in these cases, when the code is there but Google can't verify it, that usually means that the URL you are pointing Google to is incorrect.
Make sure you watch the "trailing slash" (best practice is to include it) when providing Google with the URL to verify the code at or it may fail to recognize the install.
That is exactly why you don't see it. The starter version does not include all the features as the "upgraded" version (still free.)
No. That is just the identification number Google has assigned to that particular campaign. You can run multiple campaigns under one account.
Yes, a few things have changed (not much) and it is best to use a different match type (briefly explained in the GA Uncovered book) that drops the actual domain name.
I suspect that you either have set the funnel up incorrectly (not including any steps after it, or including pages that are named differently from what is in the book (such as in the case of SEO URLs mods which alter url naming conventions).
Unless you altered the code to try to track two domains, I doubt that is the issue only because a Goal and associated Funnel are setup using urls to the site you are tracking. This would remove the possibility of it trying to mis record data based on two sites (unless of course you entered two different site urls into your funnel which could cause it to look like users are bouncing at that first step.)
Got that part...
I'm using https://secure.remarkablepens.com/index.php?main_page=checkout_successQuote:
I suspect that you either have set the funnel up incorrectly (not including any steps after it, or including pages that are named differently from what is in the book (such as in the case of SEO URLs mods which alter url naming conventions).
as my Goal URL which *is* different than the starting domain and the domain name I am tracking - just plain www.remarkablepens.com
This has to be it, but I'm not sure how to get around it since my certificate is issued on the "secure" domain name.Quote:
Unless you altered the code to try to track two domains, I doubt that is the issue only because a Goal and associated Funnel are setup using urls to the site you are tracking. This would remove the possibility of it trying to mis record data based on two sites (unless of course you entered two different site urls into your funnel which could cause it to look like users are bouncing at that first step.)
Ok, got the new release uploaded and ready to go for this.
I uploaded it to the Zen Cart downloads section but if you can't wait for it to get activated there, then you can download it from my site by clicking here.
The newest version is now 1.2.2
This addresses the confirmed reports of a bug on Google's end which causes adopter's of the "ga.js" tracking code to receive incorrect reporting data specifically relating to ecommerce transactions and conversion rates.
What this new release does:
This new release has all the same features of the previous release (1.2.1 and 1.2.0) but in it I have added the ability for you to switch easily between the older "urchin.js" tracking code and the newer "ga.js" tracking code while Google corrects their error on their end with the newer "ga.js" code.
You do it by simply selecting a radio button from within the Admin.
NOTE TO UPGRADER'S OF PREVIOUS VERSIONS
If you already have version 1.2.0 or 1.2.1 of Simple Google Analytics installed, then you only have to do 2 things to get the new one working.
1) upload the file /includes/templates/your_template/google_analytics/google_analytics.php
to the proper location on your web server and overwrite the current file that is there.
2) Run the "upgrade" sql patch from within the Admin (copy and paste it into the space provided rather than uploading) that has the following name:
UPGRADE-FromVersion1-2-1_ONLY.sql
First Time NEW INSTALLS
If you have not installed any other previous versions of Simple Google Analytics, you should:
1) Read and follow the instructions found in the file named:
"README_FirstTimeINSTALLATION.txt"
2) From within your Zen CArt admin copy, paste, and run the sql patch from the file named "googleanalytics-INSTALL.sql".
You're all set.
Enjoy everyone!
Hey Guys,
I installed Version 1.21 yesterday morning and set it up on www.xtreme-stunts.com . However till today I haven't received any data from google analytics even though it says "receiving data" on the google analytics page.
Now i just upgraded to version 1.22 and enabled the old java file.
Could that have been the problem? How long does it normally take to see data in my google analytics account?
Thanks a lot
Stntsmovie.com
As of this writing Google has NOT yet corrected the "ga.js" tracking code. They say a patch will be in place in the beginning of April, but I needed accurate stats to make the right decisions and I'm not holding my breath for them.
I have decided to keep using the older "urchin.js" tracking code as long as I can (or a least until it is confirmed that Google indeed has corrected the issues with the ga.js code.)
Econcepts - I have put in my forward slash and it still says tracking not installed. Any other ideas in what could be causing this not to work? Thanks. :frusty:
Thanks for your reply. I definitely added that bit in /includes/templates/custom/common/tpl_main_page.php.
Here is a copy of the file:
Custom is definitely my directory. The google analytics code is still not showing up when I view the source of www.lakeslampshades.com though...:(Code:<?php
/**
* Common Template - tpl_main_page.php
*
* Governs the overall layout of an entire page<br />
* Normally consisting of a header, left side column. center column. right side column and footer<br />
* For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
* example: to override the privacy page<br />
* - make a directory /templates/my_template/privacy<br />
* - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
* <br />
* to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
* to turn off the header and/or footer uncomment the lines below<br />
* Note: header can be disabled in the tpl_header.php<br />
* Note: footer can be disabled in the tpl_footer.php<br />
* <br />
* $flag_disable_header = true;<br />
* $flag_disable_left = true;<br />
* $flag_disable_right = true;<br />
* $flag_disable_footer = true;<br />
* <br />
* // example to not display right column on main page when Always Show Categories is OFF<br />
* <br />
* if ($current_page_base == 'index' and $cPath == '') {<br />
* $flag_disable_right = true;<br />
* }<br />
* <br />
* example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
* <br />
* if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
* $flag_disable_right = true;<br />
* }<br />
*
* @package templateSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $
*/
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
$flag_disable_right = true;
}
$header_template = 'tpl_header.php';
$footer_template = 'tpl_footer.php';
$left_column_file = 'column_left.php';
$right_column_file = 'column_right.php';
$body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
<?php
if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<div id="mainWrapper">
<?php
/**
* prepares and displays header output
*
*/
if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
$flag_disable_header = true;
}
require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper">
<tr>
<?php
if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
// global disable of column_left
$flag_disable_left = true;
}
if (!isset($flag_disable_left) || !$flag_disable_left) {
?>
<td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>">
<?php
/**
* prepares and displays left column sideboxes
*
*/
?>
<div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td>
<?php
}
?>
<td valign="top">
<!-- bof breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
<div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
<?php
if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!-- bof upload alerts -->
<?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
<!-- eof upload alerts -->
<?php
/**
* prepares and displays center column
*
*/
require($body_code); ?>
<?php
if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?></td>
<?php
//if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {
if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
// global disable of column_right
$flag_disable_right = true;
}
if (!isset($flag_disable_right) || !$flag_disable_right) {
?>
<td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>">
<?php
/**
* prepares and displays right column sideboxes
*
*/
?>
<div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td>
<?php
}
?>
</tr>
</table>
<?php
/**
* prepares and displays footer output
*
*/
if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
$flag_disable_footer = true;
}
require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
?>
</div>
<!--bof- parse time display -->
<?php
if (DISPLAY_PAGE_PARSE_TIME == 'true') {
?>
<div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
<?php
}
?>
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<?php
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof- banner #6 display -->
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
</body>
Any ideas?
Thanks,
Nate
Trying to read through this thread. I was trying to update to google analytics 1.2.2 in my cart 1.3.8a. Does the new ga.js code not work?
I have edited and changed some files and now I'm lost.
Also where does this code go????
Thanks.Code:
<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>
How is this looking now after waiting for Google a bit?
Any luck yet?
Make sure you have the proper tracking code in place as well. The code is on the page (I can see it) so the only way Google will not be able to identify it is if the url you are telling Google to look for it at is incorrect or the tracking number used does not match up with the one Google has you set with.
Can you confirm the status of this?
Nate,
Do you have the tpl_main_page.php in the right directory?
That may sound nuts, but the only way the code will not show up is if you either did not insert the lines from step 3 (which you did do it looks like) or the file that you inserted into is in the wrong directory (which it does not seem like either.)
My suggestion would be to go in and make sure you completed each step as indicated in the install one more time.
It should be a very quick install (only two files or so).
Let me know if you are still having problems.
Thanks!