-
Re: Simple Google Analytics - Support
I'm confused. I've installed and configured the mod and my site is receiving data. I need to continue to track ecommerce conversions but I can't seem to get that section of the tracking code to generate. It seems like this code is not triggering as true:
if($page_directory == 'includes/modules/pages/checkout_success') {
and the else clause is treating it as a normal page.
Any ideas?
btw I'm running 1.3.9g with cowoa added
-
Re: Simple Google Analytics - Support
Hello,
I just checked again, now it says receiving data. I thought that sign comes up right away, but guess not. Thank you.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
badarac
I'm confused. I've installed and configured the mod and my site is receiving data. I need to continue to track ecommerce conversions but I can't seem to get that section of the tracking code to generate. It seems like this code is not triggering as true:
if($page_directory == 'includes/modules/pages/checkout_success') {
and the else clause is treating it as a normal page.
Any ideas?
btw I'm running 1.3.9g with cowoa added
Are you sure you are running SIMPLE Google Analytics? That line is not in any of my code. I think you must be running Andrew's version of Google analytics.
My version (Simple Google Analytics) has ecommerce tracking built in by default no site or code adjustments needed.
My version also works on all zen cart version (even 1.3.9 +)
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
nycxkkoma
Hello,
I just checked again, now it says receiving data. I thought that sign comes up right away, but guess not. Thank you.
Yes, it can take time for Google to show that it is receiving data.
Glad you got it working!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Are you sure you are running SIMPLE Google Analytics? That line is not in any of my code. I think you must be running Andrew's version of Google analytics.
My version (
Simple Google Analytics) has ecommerce tracking built in by default no site or code adjustments needed.
My version also works on all zen cart version (even 1.3.9 +)
Hi Eric,
Yes I checked and it is in fact your mod. That line of code appears in your includes/templates/my_templates/google_analytics/google_analytics.php
at around line 81. For some reason it's not detecting that the calling page is checkout_success. I added some text to the else path to verify that it was in fact executing the else code and it is. Any suggestions?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
badarac
Hi Eric,
Yes I checked and it is in fact your mod. That line of code appears in your includes/templates/my_templates/google_analytics/google_analytics.php
at around line 81. For some reason it's not detecting that the calling page is checkout_success. I added some text to the else path to verify that it was in fact executing the else code and it is. Any suggestions?
I see that here. Are you using the newest version? (I thought I changed that line a while back ... it will be altered in the next release (out soon with some great new features.)
Do this for me.
Change that line of code to the following and see if it has any effect (this is the line of code that it is being altered to in the new release)
PHP Code:
if ($_GET['main_page']=="checkout_success") {
So you are removing the previous line of code and in place of it adding this. (Do this in each location that appears in the script.)
Let me know if that has any impact. I've never heard of this mod every causing any issues with that line (or ecommerce tracking at all) and I've got it running on 1.3.9+ versions with no issues.
There is always a first time for everything though and we'll figure out what is causing it.
Let me know if the above works!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
I see that here. Are you using the newest version? (I thought I changed that line a while back ... it will be altered in the next release (out soon with some great new features.)
Do this for me.
Change that line of code to the following and see if it has any effect (this is the line of code that it is being altered to in the new release)
PHP Code:
if ($_GET['main_page']=="checkout_success") {
So you are removing the previous line of code and in place of it adding this. (Do this in each location that appears in the script.)
Let me know if that has any impact. I've never heard of this mod every causing any issues with that line (or ecommerce tracking at all) and I've got it running on 1.3.9+ versions with no issues.
There is always a first time for everything though and we'll figure out what is causing it.
Let me know if the above works!
I made the change and it still doesn't detect the checlout success module. Here's what is being generated on the checkout success page:
<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-1");
pageTracker._initData();
pageTracker._trackPageview();
</script></body></html>
I made the change two places in the file. Here is the version info from the install file:
Version Date: v 1.2.2 01/09/2008 Eric Leuenberger (Zen ID: econcepts) http://www.zencartoptimization.com. If there's a different version available somewhere for download I'll be happy to try it.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
badarac
I made the change and it still doesn't detect the checlout success module. Here's what is being generated on the checkout success page:
<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-1");
pageTracker._initData();
pageTracker._trackPageview();
</script></body></html>
I made the change two places in the file. Here is the version info from the install file:
Version Date: v 1.2.2 01/09/2008 Eric Leuenberger (Zen ID: econcepts)
http://www.zencartoptimization.com. If there's a different version available somewhere for download I'll be happy to try it.
A few things.
1) Your tracking code is not in place. I see 'UA-xxxxxxx-1' and that should be your tracking code. Make sure you enter that code within the admin or the tracking will not work.
2) Are you running any affiliate programs or anything else that might affect the checkout page? If so, there is a different way I'll have you integrate it. Sometimes those mods make alterations to the checkout success page that override any tracking.
3) You might want to switch to the Urchin form of the tracking for a short time as it is more accurate on ecommerce tracking. But I don't see the ecom tracking code on the thank you page (likely due to other mods which alter the checkout success page as mentioned) and so this is just a side note to consider.
Let me know answers to the above and if you want to send me a url to the site I can look at that as well.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
A few things.
1) Your tracking code is not in place. I see 'UA-xxxxxxx-1' and that should be your tracking code. Make sure you enter that code within the admin or the tracking will not work.
2) Are you running any affiliate programs or anything else that might affect the checkout page? If so, there is a different way I'll have you integrate it. Sometimes those mods make alterations to the checkout success page that override any tracking.
3) You might want to switch to the Urchin form of the tracking for a short time as it is more accurate on ecommerce tracking. But I don't see the ecom tracking code on the thank you page (likely due to other mods which alter the checkout success page as mentioned) and so this is just a side note to consider.
Let me know answers to the above and if you want to send me a url to the site I can look at that as well.
Sorry, I should have mentioned that I edited the account number.. It's actually set in the config settings.
I'm not running any affiliate programs and the only mod to the tpl_checkout_success_default.php is from the current COWOA mod. The analytics code is being called from the main page which was unmodified until I added the following line as instructed <?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>. Otherwise it is unmodified from the one in template_default.
The site is www.beachtradingco.com. You can call me on the 800 number if you want to kick stuff around real time.
-
Re: Simple Google Analytics - Support
Just a quick update. I added a line to have it echo the main_page in each path of the if statement. It seems that for some reason the main page variable as soon as I start the checkout process is set to time_out. It stays set at that value through the entire checkout process. This has to be related somehow to the COWOA mod but so far I can't see it. The url is correctly built for each checkout page. Weird.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
badarac
Just a quick update. I added a line to have it echo the main_page in each path of the if statement. It seems that for some reason the main page variable as soon as I start the checkout process is set to time_out. It stays set at that value through the entire checkout process. This has to be related somehow to the COWOA mod but so far I can't see it. The url is correctly built for each checkout page. Weird.
I'm on the site now and just ran a test order. When I view the source throughout the entire process (including on the checkout success page) the tracking code is in place.
This does include the ecommerce tracking as well. It is in place and looks to be working as it should. So, if you are not seeing ecommerce tracking then there must be something else wrong within your Google Analytics account.
Did you let Google know you want to track ecommerce transactions? You have to tell Google you want to track them (from within your Google Analytics profile) for the ecommerce tracking data that is passed in the code to actually be recorded by Google. If you don't do that, no matter if the code is working or not, the data will not be saved on Google's end.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
I'm on the site now and just ran a test order. When I view the source throughout the entire process (including on the checkout success page) the tracking code is in place.
This does include the ecommerce tracking as well. It is in place and looks to be working as it should. So, if you are not seeing ecommerce tracking then there must be something else wrong within your Google Analytics account.
Did you let Google know you want to track ecommerce transactions? You have to tell Google you want to track them (from within your Google Analytics profile) for the ecommerce tracking data that is passed in the code to actually be recorded by Google. If you don't do that, no matter if the code is working or not, the data will not be saved on Google's end.
Eric,
I really apologize for all the confusion. It looks like this is a browser problem. I tried placing an order using the Firefox browser which I normally use and the ecommerce code was not generated. After getting your reply I got to thinking that this might be a browser issue and placed a test order using Chrome. Lo and behold the ecommerce code was generated and populated with all the right stuff. I'm gonna go clear everything in the FF browser and crawl back under my rock. Thanks for the help. :blush:
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
badarac
Eric,
I really apologize for all the confusion. It looks like this is a browser problem. I tried placing an order using the Firefox browser which I normally use and the ecommerce code was not generated. After getting your reply I got to thinking that this might be a browser issue and placed a test order using Chrome. Lo and behold the ecommerce code was generated and populated with all the right stuff. I'm gonna go clear everything in the FF browser and crawl back under my rock. Thanks for the help. :blush:
No problem. It should work on ANY browser though. I ran it on FireFox myself and saw the tracking code just fine.
I also ran it on Safari and IE and it was fine. There is nothing in the code that would prevent it from showing from browser to browser.
However, check to see if you have DISABLED javascript on your FireFox browser as that would cause the code not to show (of course).
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
No problem. It should work on ANY browser though. I ran it on FireFox myself and saw the tracking code just fine.
I also ran it on Safari and IE and it was fine. There is nothing in the code that would prevent it from showing from browser to browser.
However, check to see if you have DISABLED javascript on your FireFox browser as that would cause the code not to show (of course).
Javascript is enabled in my browser. This trouble is related to something unique to the Firefox/PC environment I'm running on. I created a new post in the general section to see if anybody can help with debugging this problem. You're mod works fine. Here's a link in case anybody can help. http://www.zen-cart.com/forum/showthread.php?t=165451
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
badarac
Javascript is enabled in my browser. This trouble is related to something unique to the Firefox/PC environment I'm running on. I created a new post in the general section to see if anybody can help with debugging this problem. You're mod works fine. Here's a link in case anybody can help.
http://www.zen-cart.com/forum/showthread.php?t=165451
Ah gotcha! I'll follow it there to see what comes of it.
-
Re: Simple Google Analytics - Support
Hi Eric, I have a problem with tracking that I would be very grateful if you helped with.
We are running your Simple Analytics Plugin on Zen Cart 1.3.8a. I have had the code installed and running for quite some time but haven't spent the time trying to get to understand things until recently.
I have conversion tracking turned on and integrated with Google Adwords.
At the moment there seems to be a discrepency between the data in the zen cart admin panel, in Google Analytics, and in Google Adwords Conversion Reporting.
(We are only a small start up so the figures are very low but we are working on our adwords campaigns to try and improve sales, so having accurate information is quite important)
This is a summary of the data in each for yesterday:
1. Zen Cart - 2 sales. One sale of $18.90 and one of $18.12.
2. Google Analytics - 1 sale registered only - the one of $18.12. Where is the sale at $18.90?
3. Google Adwords - 2 conversions reported - value $73.12. This looks like it picked up the $18.12 sale but this leaves a supposed sale of $55 that never happened.
Your advice on this would be much appreciated.
Thank you in advance.
Nathan
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
nathanscrivener
This is a summary of the data in each for yesterday:
First thought is to make sure that Google has had time to fully update. I have noticed that sometimes (depending on when a sale was made) it may take up to 24 hours for the full amount of data to show for a given day.
Second thing to consider is that there will always be some type of discrepancy in reporting across platforms due to any of the following reasons:
a) Javascript is turned off or being blocked by the client browser. (Google analytics is based on Javascript tracking so anyone with that blocked or disabled will not show in reports.)
b) The discrepancies are bigger if using the ga.js version of the tracking code. I have noticed that the older legacy "urchin" code has the most accurate tracking across the board (again, a google thing.)
c) Each tracking system you use provides data that reports on DIFFERENT aspects of your business (see response to your question #3 below for more on this.)
Quote:
Originally Posted by
nathanscrivener
1. Zen Cart - 2 sales. One sale of $18.90 and one of $18.12.
This is ALWAYS going to the the 'right number' of sales. Obviously if a sale is completed, it will show as a 'new order' on the zen cart side ... no way around that. So for the most accurate 'sales numbers' (revenue that is) you would want to turn to the zen cart store.
Quote:
Originally Posted by
nathanscrivener
2. Google Analytics - 1 sale registered only - the one of $18.12. Where is the sale at $18.90?
This is common with analytics based on the information I listed in the very first part of the response. The one sale that did not record could have been a user with Javascript or something disabled or blocked (it happens a lot more than you think.)
Quote:
Originally Posted by
nathanscrivener
3. Google Adwords - 2 conversions reported - value $73.12. This looks like it picked up the $18.12 sale but this leaves a supposed sale of $55 that never happened.
This is perplexing to me to some degree only because the (sales) values are different that which you have told my in part 1.
However, it is VERY possible that you get 2 sales, and only one shows in the Adwords side. Why? Because you'll only see a sale within Adwords if that sale came directly from your ppc advertising. If you get a sale that did not first come through an ad of yours, it will show in analyticxs, but NOT adwords. For a sale to show in Adwords the visitor has to first click on an ad of yours to get to your site.
You wouldn't want to track sales as coming from adwords if they really didn't or you would not be able to gather accurate data to find out how well your adwords is performing.
Think of it this way. Google Analytics data is separate from Google Adwords (but they both tie together to give the most accurate data) and Google Ecommerce data is slightly 'stand alone' as well from the rest (yet ties in for more accurate data.) They are all not one system and are meant to track different aspects of your business.
When users try to associate them as all being one, that is when they get confused as to what the data really means. 'Reading' analytic data is far different from 'Interpreting' analytic data.
Hope that helps.
-
Re: Simple Google Analytics - Support
Hi Eric, thank you very much for your reply.
I have switched the plugin the urchin.gs mode, to see if that delivers more accurate results in Google Analytics. I was under the impression from the text in the plugin that this is something that was to be fixed by google in 2008. I guess that never happened.
So I follow that if the user has javascript switched off, then the sale will not record in Google Analytics. I wonder how common this is?
My main concern, which remains unanswered, is this sale of $55 recorded in conversion reports in Google Adwords that never happened. Or alternatively it picked up the other sale that Google Analytics missed, but got the order value wrong. Could this be an issue in the plugin code? Could this be explained by a default conversion value?
Thanks again and I look forward to your reply.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
nathanscrivener
My main concern, which remains unanswered, is this sale of $55 recorded in conversion reports in Google Adwords that never happened. Or alternatively it picked up the other sale that Google Analytics missed, but got the order value wrong. Could this be an issue in the plugin code? Could this be explained by a default conversion value?
It definitely isn't the plugin code, I have used this code on a large number of sites for years and have had no issues like that.
If you have a 'default' conversion value setup (within your Google Analytics, then this could cause the problem.) Leave all default conversion values to blank or '0'.
I never set default conversion values as I use the dynamic (more realistic) values.
-
Re: Simple Google Analytics - Support
Hi Eric
I really don't know where to turn from here ... I checked G Analytics and there are no default conversion values that I can see ... so where has this conversion value figure come from?
Do you have any suggestions?
-
Re: Simple Google Analytics - Support
It's tough to say where the conversion value came from but the only options seem to be either a sale from the store or a sale that related to a default value (which you mentioned there is none.)
Without seeing it all and testing, it's very tough to determine. You should be able to tell from within Analytics what products made up that transaction.
I would suggest isolating the day the transaction occurred and then drilling down on the data to find out what made that up. That may provide some insight as to what caused it. You should even be able to get the order number etc... from within your analytics as well if that is setup. This will let you know what number it came from (if any) etc...
-
Re: Simple Google Analytics - Support
Has this been modified to place the code diretly before the </head> tag?
-
Re: Simple Google Analytics - Support
Not this version, but the next release (due out very soon) does. It's currently being tested on a few sites and I'll be releasing that in the coming weeks on in the zen cart downloads section.
I'll post here when that is ready as well.
-
Re: Simple Google Analytics - Support
I have not read this WHOLE long thread, so i appologise if the question has been asked.
I installed Simple Google Analytics a few days ago. It is fun (and addictive) to look at the figures, and so far, trying to understand what they all mean. One thing i noticed is that in the ecommerce part of the stats it does not seem to match the sales i made during those days reported.
For example, i have had invoices #4 to #9, but it seems to take into account only invoices #4, 5, 7, 9, and skips invoices #6 and 8.
Also, in the Product performance, i see that some products are listed there, yet, they have NOT been sold during those days.
So all in all, i am getting some information that i find a bit... inaccurate to say the least.
Anyone else experienced similar situation?
-
Re: Simple Google Analytics - Support
You'll always have some discrepancies due to Google being JavaScript driven.
Take a look at posts 1318 to 1320 for some more on this.
-
Re: Simple Google Analytics - Support
Thanks. I had not reached those posts yet!
-
Re: Simple Google Analytics - Support
Hi Eric, I just installed this but my ecommerce isn't tracking. Reading back you mention:
Quote:
"2) Are you running any affiliate programs or anything else that might affect the checkout page? If so, there is a different way I'll have you integrate it. Sometimes those mods make alterations to the checkout success page that override any tracking."
...I am running JROX Affiliate Manager and there is some integration code from them in tpl_footer.php - could this be the issue do you think?
Thanks
Adele
-
Re: Simple Google Analytics - Support
Yes Adele, that is why it is not tracking.
The answer to correcting it is at the following link.
Scroll to the bottom of the page (around July 22, 2009) and you'll find a comment section that talks about the JAM / JROX integration.
http://www.zencartoptimization.com/2...-the-workbook/
-
Re: Simple Google Analytics - Support
I realise the Google Analytic cannot track EVERYTHING and EVERY transaction, giving figures somewhat lower than they are. I was wondering if anyone would have a rough average of how much is "missing" as far as the figures are concerned in Google Analytics? Like can i expect a 10% discrepancy? 20%? I would like to get at least a ball park figure if possible.
Thanks.
-
Re: Simple Google Analytics - Support
Sorry if this was answered in an earlier post, I looked back a few pages and couldnt see anything relevant
zencart 139, new install, trying install Simple GA. When running the SQL script I get an error code 106: Syntax error for the second line Select (@t4:=configuration_group_id) as t4
is there an update to this script or a change I need to make to it for the latest MYSQL?
Thanks
Grant
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
CaroleAs
I realise the Google Analytic cannot track EVERYTHING and EVERY transaction, giving figures somewhat lower than they are. I was wondering if anyone would have a rough average of how much is "missing" as far as the figures are concerned in Google Analytics? Like can i expect a 10% discrepancy? 20%? I would like to get at least a ball park figure if possible.
Thanks.
There is no rough estimate as it would be different for every company and completely dependent on the number of visitors that have their browser set to block or not run JavaScript. Once you figure out what this is for your business you would be able to use that figure.
I work with some pretty big companies that use GA and we don't worry too much about the discrepancy as it is often so small it doesn't really make a difference if you are looking at right numbers anyhow.
Basically, to get your overall picture of how your website is really performing (meaning how effective it is at turning website visitors into sales) you should be taking averages over a given range of time anyhow. Those averages when compared with previous numbers over a similar time range are what is going to determine your next move.
If the range is too large your numbers will be watered down ... if too small, they will have greater margin of error.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
riggergrant
Sorry if this was answered in an earlier post, I looked back a few pages and couldnt see anything relevant
zencart 139, new install, trying install Simple GA. When running the SQL script I get an error code 106: Syntax error for the second line Select (@t4:=configuration_group_id) as t4
is there an update to this script or a change I need to make to it for the latest MYSQL?
Thanks
Grant
What version of MySQL are you using?
-
Re: Simple Google Analytics - New Version 1.2.3 Released
Ok, I just completed and released an update to the previous Simple Google Analytics module. There were a number of items I had been meaning to alter and add to the original, and that is covered in this release. I've tested this on a number of sites and it works flawlessly.
For those that have a previous version (1.2.x etc...) it is a super easy upgrade. I included a separate readme file for reference. Basically if you follow that readme it will tell you want needs to be done to upgrade.
This version is 1.2.3 and has the following features:
1. New Asychronous tracking has been added as an option so you can now select either the legacy 'urchin.js' tracking code, the ga.js tracking code or the newest Asynchronous tracking code released in Dec 2009 by Google.
Placement of tracking is also automatically taken care of (moving the asynchronous tracking to the top).
2. This version is extremely flexible (for easy expansion) and allows you to track any custom variables you would like for your store following the guidelines Google sets forth at the following link:
http://code.google.com/apis/analytic...Variables.html
This means a user can easily track domains and events of their choosing without any limitations. If you have any current customizations you made to your tracking code you can now easily add them to the site from the Admin interface of Zen Cart.
3) Built in ability to track Ecommerce transactions, goals, funnels, and even pay-per-click conversion automatically, and all in one interface.
4) Easy install / easy upgrade.
It is pending activation in the Zen Cart download section but if you can't wait to get it there you can download it now from the following link: zencartoptimization.com/downloads/
-
Re: Simple Google Analytics - New Version 1.2.3 Released
Just finished the upgrade (1.2.2 to 1.2.3) - everything seems to of gone smoothly, thanks to your very simple and clear README_UPGRADE-TO-1-2-3.txt .
Thanks for your continuous support and development of this fantastic add on :smile:
-
Re: Simple Google Analytics - Support
Glad to hear it all went well. Enjoy!
-
Re: Simple Google Analytics - Support
First of all thanx very much for this contribution!
then i've followed instruction for 1st installation, also installed the sql file
but now i have a problem i don't have: google analytics in my admin area... (configuration->google analytics) Even if i well uploaded the corret file in my admin folder
so i wonder what i did wrong...
Any help whould be much appreciated
-
Re: Simple Google Analytics - Support
If you didn't get any error messages when running the install patch (not the upgrade patch) then you should see it under the configuration section.
Are you running any "admin permissions" module that might prevent it from showing (until you select it to be accessible from your admin settings section?)
That config section is added not through the actual uploading of the files, but through the SQL patch that installs the mod.
-
Re: Simple Google Analytics - Support
oh my what a blond moment lol!
my store got a lot of modules on it and yep i've got the admin permissions' one and i can now see the google analytics in my configuration now :clap:
-
Re: Simple Google Analytics - Support
Eric:
A couple of questions please:
1. How can I check my database to see if I previously installed the first version? What word can I use to search my database?
I am asking because I think I started the first installed and never finished it and I just want to make sure I install the correct sql patch.
2. This file: includes/modules/pages/checkout_success/on_load_main.js
I don't have this file.
Thanks!
-
Re: Simple Google Analytics - Support
Eric, I used Google Analytics by Andrew. Now should I uninstall that sql? Or will adding your patch be okay?
Thanks!
-
Re: Simple Google Analytics - Support
Eric, I uninstall the first GA and installed yours. I have another question, where can I find this:
Google Custom Code - After
Please copy and paste or add your custom tracking here.
I tried looking through my GA account and cannot find it.
Thanks!
-
Re: Simple Google Analytics - Support
Eric, I think I found it...under Actions...I pasted the script code in the box.
Is that correct?
I have been zenning too much! :bigups:
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
PinkLeopard
Eric, I think I found it...under Actions...I pasted the script code in the box.
Is that correct?
I have been zenning too much! :bigups:
No. You ONLY want to use the "custom" section if you are looking to add more customized tracking your original code (like tracking page specific actions, domain info, etc...).
If you are not looking to track custom events then you should not use that section at all.
The only thing you need to do is to add your analytics ID to the section in the admin and then if you want to track pay per click conversion (adwords) include your tracking id for that.
So in your case if you are not customizing the code just leave the custom section BLANK.
Also, if you had Andrew's version of GA already installed, you'll want to make sure you completely remove any FILES that came with that version and alter back any lines of code that may have been done upon installing that. I believe that version has a number of things you have to do to actual files for installation, and if you do not remove those, you'll find the tracking is off (may not even work).
Just running the uninstall patch for that previous version will not work. You'll need to get the files back to their original settings (before that install).
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
bluey28
oh my what a blond moment lol!
my store got a lot of modules on it and yep i've got the admin permissions' one and i can now see the google analytics in my configuration now :clap:
Yes, that is what it sounded like was going on. Glad you figured it out.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
No. You ONLY want to use the "custom" section if you are looking to add more customized tracking your original code (like tracking page specific actions, domain info, etc...).
If you are not looking to track custom events then you should not use that section at all.
The only thing you need to do is to add your analytics ID to the section in the admin and then if you want to track pay per click conversion (adwords) include your tracking id for that.
So in your case if you are not customizing the code just leave the custom section BLANK.
Also, if you had Andrew's version of GA already installed, you'll want to make sure you completely remove any FILES that came with that version and alter back any lines of code that may have been done upon installing that. I believe that version has a number of things you have to do to actual files for installation, and if you do not remove those, you'll find the tracking is off (may not even work).
Just running the uninstall patch for that previous version will not work. You'll need to get the files back to their original settings (before that install).
Thanks Eric...you're a doll...
I removed the script and now going to remove all of Andrew's file..
Thanks again for a wonderful addon and your help. :yes:
-
Re: Simple Google Analytics - Support
Hi Eric,
First of all, thanks for your hard work in updating this module!
I'm using version of Zen Cart 1.3.9e. I installed the Simple Analytics Module using your instructions in the readme.txt. file (very easy to follow BTW).
However, I'm getting a caution sign in Analytics with the error "Tracking Unknown." I did a View Page Source of the home page of the site and I could see the tracking code before the </body> tag, but I could not see the code before the </head> tag.
I double checked by looking at the html_header.php file in cPanel and the PHP code is there... but it looks like it is not generating the necessary js code in the final output. Here is the code I put right before the </head> tag in html_header.php:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
Do you have any ideas what might be going on here?
The domain is http://www.firstmedicalprodcuts.com
Thanks!
Matt
-
Re: Simple Google Analytics - Support
Sorry, I spelled the URL wrong. It should be this:
http://www.firstmedicalproducts.com
-
Re: Simple Google Analytics - Support
Here is an update on what happened.
Earlier I waited several hours before I posted my problem. I had read in previous posts on this thread that sometimes it takes several hours for Google to become aware of the tracking code and for the analyitics account to be 'receiving data.'
As of about 4 hours after I installed the module it was not working. I came back and checked analytics about 8 hours later and viola! It was receiving data.
So, it seems like I was pre-mature in posting my original problem.
-
Re: Simple Google Analytics - Support
That's great to hear. Thanks for letting us know everything is working.
-
Re: Simple Google Analytics - support
I,ve installed Simple Google Analytics and also signed up. I have my UA numbers which are pasted on the zen cart admin Simple Google Analytics configuration page. although I have a green checkmark on one site I still have the ! mark on my second profile (i.e my site has 2 domains, one is tte.ca the other one is thetrailingedge.com) Im not getting any information, its been well over 2 days that I installed and signed in. Upon reading up on the
Google Analytics site and reading Getting Started with the Asynchronous Snippet, it tells me the following:
The Analytics snippet is a small piece of JavaScript code that you paste into your pages. It activates Google Analytics tracking by inserting ga.js into the page. To use this on your pages, copy the code snippet below, replacing UA-XXXXX-X with your web property ID. If you need to do more than basic page tracking, see the tracking reference for a list of methods available in the API and see the Usage Guide for details on using the asynchronous syntax. For step-by-step instructions on setting up tracking, see the Help Center article on setting up tracking.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Am I suppose to enter this and if so where do I put it, Please advise.
P.S. I followed the install information to a tee.
Thanks,
-
Re: Simple Google Analytics - Support
Apparently I can only post on the 3rd party thread. so this is for
kdays. In answer to your helpful response on the other thread
It is telling me that I am receiving data. at the bottom though its telling me to paste this code.
Paste this code on your site
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19545334-1']);
_gaq.push(['_setDomainName', '.thetrailingedge.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
I don't mind entering this code I just don't understand where.
also my url is www. thetrailingedge.com this one is receiving data
and www.tte.ca is waiting to receive data.
thanks for your help.
Bob
Any help would be greatly appreciated
RobertG is online now Report Post Reply With Quote
-
Re: Simple Google Analytics - support
Quote:
Originally Posted by
RobertG
I,ve installed Simple Google Analytics and also signed up. I have my UA numbers which are pasted on the zen cart admin Simple Google Analytics configuration page. although I have a green checkmark on one site I still have the ! mark on my second profile (i.e my site has 2 domains, one is tte.ca the other one is thetrailingedge.com) Im not getting any information, its been well over 2 days that I installed and signed in. Upon reading up on the
Google Analytics site and reading Getting Started with the Asynchronous Snippet, it tells me the following:
The Analytics snippet is a small piece of JavaScript code that you paste into your pages. It activates Google Analytics tracking by inserting ga.js into the page. To use this on your pages, copy the code snippet below, replacing UA-XXXXX-X with your web property ID. If you need to do more than basic page tracking, see the tracking reference for a list of methods available in the API and see the Usage Guide for details on using the asynchronous syntax. For step-by-step instructions on setting up tracking, see the Help Center article on setting up tracking.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Am I suppose to enter this and if so where do I put it, Please advise.
P.S. I followed the install information to a tee.
Thanks,
If you are using Simple Google Analytics you do NOT need to follow any instructions on the Google site. It's all done for you in the contribution already (placement of code, etc...). Only follow the instructions that are found in the Simple GA readme file.
All you have to do is insert your GA tracking ID in the proper location within the Zen Cart admin, select the type of tracking you want and you're all set.
Do NOT paste any code that Google says to anywhere within your site if you have the Simple Google Analytics mod installed.
I looked at your site (from the above post) and you've got multiple tracking codes, and multiple tracking types on the page.
The header as the Async tracking code with one Google Analytics ID and then the footer has the ga.js version of the tracking code in place with a totally different tracking id.
These will conflict with each other.
You need to pick one or the other, and then only use the tracking id that is designated for your specific url. Do not put both in place.
So what you'll need to do is find out which code you inserted yourself (that was not inserted through the Simple GA contribution and then remove that tracking (only leave the Simple GA in place.)
Confirm your tracking id matches that of the site you are trying to "verify" from within your GA account and you're all set.
-
Re: Simple Google Analytics - Support
Thank you very much for your help. I've followed up with everything you suggested, Now I'll wait for the results. I'll keep you apprised of the situation. Thanks again for your help.
Sincerely,
Bob:clap:
-
Re: Simple Google Analytics - Support
No problem. Let us know how it turns out for you.
-
Re: Simple Google Analytics - Support
Hi all!
I apologize if I am asking a redundant question, however, I have made an honest attempt to find any prior posts related to my issue.
I am currently using version ZC 1.3.9g. I have followed the readme to the letter--several times--and I keep coming up with the same problem: I get a blank white screen with no data. Here is a link to my site. NOTE: It doesn't contain the modified files--for the above reason of returning a blank screen and attempting to view source returns no data.
The only other addon I am running is the module to display categories in the centerbox.
Site---> w w w dot d i s c o u n t s t r o b e s dot c o m
Any ideas?
:cool:
-
Re: Simple Google Analytics - Support
A blank screen likely means you have an error in your PHP somewhere. To find out where it is you could enable the error logging in your cart , install the files, try to access them, and then view the log that is created. This will tell you right where the error is and you can correct it.
I suspect that during install of step 3, something was removed by accident.
The error logging is built in to your version. All you have to do is look at the log.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
A blank screen likely means you have an error in your PHP somewhere. To find out where it is you could enable the error logging in your cart , install the files, try to access them, and then view the log that is created. This will tell you right where the error is and you can correct it.
I suspect that during install of step 3, something was removed by accident.
The error logging is built in to your version. All you have to do is look at the log.
Too bad the debugger doesn't have a dum-dum output for operator using notepad++. Do I need to say more? :cool:
:lamo:
:oops:
-
Re: Simple Google Analytics - Support
Hi. Searching this thread, so far I do not see a reference to text appearing on the home page from the includes/templates/my_template/common/html_header.php.
My home page at www.gokaraokemachine.com shows the following text at the very top:
Quote:
/* Begin Simple Google Analytics */ /* End Simple Google Analytics */
I saw that there was an HTML-related problem in 1.3.9g that was fixed in 1.3.9h. I'm not actually sure this is HTML appearing. I had just gone live when I upgraded to 1.3.9h from 1.3.9g and noticed this problem which I had not noticed before. I just recently upgraded from Simple Google Analytics version 1.2.2 to 1.2.3. My ISP just implemented PHP 5.3.2-1ubuntu4.5.
Any tips would be appreciated. I apologize if this has been discussed somewhere in this thread--I just couldn't find the right search term.
-
Re: Simple Google Analytics - Support
Hi
I followed the instructions but couldnt find the step 2.
/includes/templates/[your_template]/common/tpl_main_page.php
I dont have this file as above, is there any other files i can put the step 3 codes on?
-
Re: Simple Google Analytics - Support
Good Friday morning all. I've been asked to do some SEO work on a Zen Cart (which I've never used) site so I've been doing research here and in manuals for the last 2 days. I'm getting ready to install Simple SEO and Simple Google Analytics and just wanted to see if there were any issues I should anticipate. I'm going through the last 50 pages of the support forum for Simple SEO and then I'll do the same for Simple Google. The only variable I may intoduce is that after I get these 2 set up I intend to create a custom opening page that I've already created in PhotoShop in HTML. It's just easier for me right now until I get more familiar with Zen Cart. I hope this isn't going to break anything.
Also, when I was forced to do a Drupal site 2 years ago they had an (buggy) Admin module that allowed me to select any element on the page and it would show the template heirarchy which made it very easy for a newbie. Is there anything comparable to this in Zen Cart?
Oh, I've already installed Module Manager if that makes a difference.
Thanks
-
Re: Simple Google Analytics - Support
juneloveelyn,
If you installed a "template" to replace the default Zen Cart, the "my_template" should be replaced with that template's name, i.e., includes/templates/apple_zen/common/tpl_main_page.php.
When you installed the Simple Google Analytics module, there was a "my_template" that was to be renamed with the template you are using. If you are using the default and have not installed a template, I believe there is a routine to follow where you duplicate all of the template_default directories in your cart and name them "classic" so you can use the overrides system. I'm sure this is explained somewhere--in a tutorial, possibly. Of course, then you would go to Admin>Configuration>templates (I think) and choose the classic template (which is a duplicate of the default template, of course).
If you are using the default "classic" Zen Cart template, then place the code in includes/templates/template_default/common/tpl_main_page.php.
You are witnessing the overrides system in action (or inaction). When you install a template, usually the index page is governed by the tpl_main_page.php. That file is derived from the template_default/tpl_main_page.php, and then saved in the new template directory. You then have a copy of the default Zen Cart template for later use, plus a copy of the modified "override" template, which is the one Zen Cart will use.
It will work if you just save it under the template_default, but if you use the method above to use a "classic" duplicate of the default, then you will have an override system. Then, in includes/templates/classic/common/tpl_main_page.php, copy the modified file tpl_main_page.php into that file, and that would be the override. That would preserve changes as overrides, thereby making future upgrades easier because you could identify your changed files more easily and upgrade any of those changed files that might be involved in the upgrade, if any.
Sorry to be so wordy. It's just a great opportunity to consider the override system in a non-abstract way.
-
Re: Simple Google Analytics - Support
Still trying to sort out my issue of the following code appearing at the top of the header at www.gokaraokemachine.com:
Quote:
/* Begin Simple Google Analytics */ /* End Simple Google Analytics */
I am starting to wonder if this is really correct HTML code? Are there not supposed to be double slashes for comments such as these? Is this a new type of HTML or a PHP convention? Asking these questions here gives me a direction to research next.
I simply copied the code into my html_header.php before the </head>. One thing I tried was a line of space before and after the inserted code. Of course, my site went blank.
Another potential avenue might be some sort of connection to the new axynchronous tracking type that this code is supposed to enable. Maybe there is some setting I need to make to cause this unwanted verbiage/code to disappear from my home page header. I need to go to the Google Analytics site and try to set this up more effectively.
I will post if I make any discoveries in these avenues of research.
-
Re: Simple Google Analytics - Support
Maybe I should uninstall and reinstall.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Hi. Searching this thread, so far I do not see a reference to text appearing on the home page from the includes/templates/my_template/common/html_header.php.
My home page at
www.gokaraokemachine.com shows the following text at the very top:
I saw that there was an HTML-related problem in 1.3.9g that was fixed in 1.3.9h. I'm not actually sure this is HTML appearing. I had just gone live when I upgraded to 1.3.9h from 1.3.9g and noticed this problem which I had not noticed before. I just recently upgraded from Simple Google Analytics version 1.2.2 to 1.2.3. My ISP just implemented PHP 5.3.2-1ubuntu4.5.
Any tips would be appreciated. I apologize if this has been discussed somewhere in this thread--I just couldn't find the right search term.
This should not be showing on the page at all. I've got this installed on a number of sites and that does not show up. It is PHP commented code that for some reason is rendering on your site. I would suggest you go back and try to reinstall. My guess is that during install, some of the items that were copied to their place were altered to show this text. It should not be on the page.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
tally622
Good Friday morning all. I've been asked to do some SEO work on a Zen Cart (which I've never used) site so I've been doing research here and in manuals for the last 2 days. I'm getting ready to install Simple SEO and Simple Google Analytics and just wanted to see if there were any issues I should anticipate. I'm going through the last 50 pages of the support forum for Simple SEO and then I'll do the same for Simple Google. The only variable I may intoduce is that after I get these 2 set up I intend to create a custom opening page that I've already created in PhotoShop in HTML. It's just easier for me right now until I get more familiar with Zen Cart. I hope this isn't going to break anything.
Also, when I was forced to do a Drupal site 2 years ago they had an (buggy) Admin module that allowed me to select any element on the page and it would show the template heirarchy which made it very easy for a newbie. Is there anything comparable to this in Zen Cart?
Oh, I've already installed Module Manager if that makes a difference.
Thanks
Installing these two mods will not cause a problem. They both work just fine together. Neither uses the module manager contribution, and in fact, not many modules use that at the moment.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Still trying to sort out my issue of the following code appearing at the top of the header at
www.gokaraokemachine.com:
I am starting to wonder if this is really correct HTML code? Are there not supposed to be double slashes for comments such as these? Is this a new type of HTML or a PHP convention? Asking these questions here gives me a direction to research next.
Nope. Just a result of human error. Read below for your answer. :)
Quote:
Originally Posted by
notageek
I will post if I make any discoveries in these avenues of research.
I'll save you some time here. The answer is as follows:
I went to your site and see what you did wrong.
You copied the text from the readme file and included the comments I had in the readme (that were not supposed to be included on the page but were only for illustration in the readme.)
You're only supposed to copy the PHP lines of code (as per the instructions).
So when you copied the information you also copied the commented text directly from the text file. When you do this with any text, and add it to a file that will be put to the internet, it will render as text on the page (as is in your case).
To remove it, just remove the lines of code that you didn't need in the first place and only include the PHP portions. That will remove it from your site.
-
Re: Simple Google Analytics - Support
Eric,
Thank you for your indispensable help and especially for your very clear explanations. Thanks also for this module.
I browsed to www.ZencartOptimization.com referenced in the module as providing tips on using Google Analytics. I'm frankly in awe of the talented writing on that site, and how engaging, well-organized, and enlightening the articles are. The articles really clarify what is happening in an online store and how analytics may be used to increase sales.
Your enthusiasm for well-used analytics seems to permeate the site, and is "catching."
Notageek
-
Re: Simple Google Analytics - Support
I just realized that I forgot to place the google_analytics.php file in my template directory.
I ran the install successfully on a test server and it went well so I guess I got sloppy
After realizing my error I copied the google_analytics.php file to the correct spot in my template folder but the GA code is still not appearing in the source of my pages.
Do I have to run the SQL command again now that the google_analytics.php file is in the correct place? If I do run it again will it cause any issues?
I am running zencart 1.3.7.1 and this is a fresh install of Simple GA 1.2.3.
Thanks in advance for your help.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
csimmons83
I just realized that I forgot to place the google_analytics.php file in my template directory.
I ran the install successfully on a test server and it went well so I guess I got sloppy
After realizing my error I copied the google_analytics.php file to the correct spot in my template folder but the GA code is still not appearing in the source of my pages.
Do I have to run the SQL command again now that the google_analytics.php file is in the correct place? If I do run it again will it cause any issues?
I am running zencart 1.3.7.1 and this is a fresh install of Simple GA 1.2.3.
Thanks in advance for your help.
No, you do not have to rerun the SQL patch.
If you don't see the tracking code still, then make sure you put the google_analytics.php file in the correct location.
If you are running a custom template then that directory goes in the 'custom template folder' (NOT the default folder.)
So if your template is called 'mycustomtemplate' then the directory would go into the following location:
/includes/templates/mycustomtemplate/google_analytics (this is the directory you uploaded.)
If you have no tracking code showing on your page at all, this is the reason it won't show (the code is likely uploaded to the wrong location.)
-
Re: Simple Google Analytics - Support
Hi Eric! Hope you are doing great...quick question..I just installed this mod and I can see the code during the checkout process and everything is set properly as far as I can tell in my Analytics account...but it is not capturing the sales?!?! I have read back a few pages and did not find anything that has helped so I figured I would check to see if you can see anything wrong?!?
The site is http://outdoorplaytoys.com
....and as always...thanks.....
-
Re: Simple Google Analytics - Support
Hi,
Thanks for a great product.
I have just installed the module on a new site (1.3.9h) and it all seems to be working fine but I thought I would try to use the "custom tracking" feature to tell me whether analytics were being generated from development, test or production shops.
I put in the following code;
Quote:
_gaq.push(['_setCustomVar',
1, // This custom var is set to slot #1. Required parameter.
'shopLevel', // The name acts as a kind of category for the user activity. Required parameter.
'Production', // This value of the custom variable. Required parameter.
3 // Sets the scope to session-level. Optional parameter.
]);
When I view source I can see what looks like correct code but when I look in Google Analytics under Visitors/Custom Variables it tells me there is "no data for this view".
Am I misunderstanding something here (I always find Google's instructions a bit hard to follow).
My new site is www.globalartprints.co.uk
Hopefully I am just doing something silly and obvious.
Thanks
Mark:blush:
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
jill8026
Hi Eric! Hope you are doing great...quick question..I just installed this mod and I can see the code during the checkout process and everything is set properly as far as I can tell in my Analytics account...but it is not capturing the sales?!?! I have read back a few pages and did not find anything that has helped so I figured I would check to see if you can see anything wrong?!?
The site is
http://outdoorplaytoys.com
....and as always...thanks.....
Hi Jill! Long time no talk. :) Good to hear from you.
Have you told Google (within your Google account) that your site is an ecommerce site? You need to do this in order for it to pick up the tracking (which is automatically in place with the mod.)
You set this from within your "Account Profile" (click 'edit').
Let me know if that helps.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
cotsweb
When I view source I can see what looks like correct code but when I look in Google Analytics under Visitors/Custom Variables it tells me there is "no data for this view".
Hi Mark,
Try adding the following code just after that event.
_gaq.push(['_trackEvent',
'Shopping', // category of activity
'Item Removal', // Action
]);
(of course you would alter it to fit your 'tracking needs').
More info on this can be found here:
http://code.google.com/apis/analytic...Variables.html
Let me know if that helps.
-
Re: Simple Google Analytics - Support
@cotsweb,
Mark, I have another idea here that should work if the last bit of info I sent doesn't.
I made a quick change to the code to place the tracking in a different location (for custom variables).
But again, try what I mention below first and let me know if it works before we go this route.
Let me know. Thanks!
-
Re: Simple Google Analytics - Support
Thanks Eric,
I have amended my code to the following;
Quote:
_gaq.push(['_setCustomVar',1,'shopLevel','Production',3]);
_gaq.push(['_trackEvent','Shopping','Database Level',]);
I will see what Google Analytics reports tomorrow and let you know the results.
Thanks for your prompt reply.
Mark:smile:
-
Re: Simple Google Analytics - Support
Help!
I have installed this fine on a test site. But when I installed to live site it went BLANK?
Anyone had this before?
-
Re: Simple Google Analytics - Support
Just to add more details to above post;
The file causing the problem is;
/includes/templates/[your_template]/common/html_header.php
If i remove the code snippet added just before the </head> the site is visable again.
Can other modules be causing a problem?
That's the only difference between my test site & this live site.
-
Re: Simple Google Analytics - Support
Hey Eric, it is definitely set up properly in Analytics ...... I am baffled! :smile:
-
Re: Simple Google Analytics - Support
Hi Eric,
The following sort of works;
Quote:
_gaq.push(['_setCustomVar',1,'shopLevel','Production',3]);
_gaq.push(['_trackEvent','Shopping','Database Level',]);
I can use CustomVar 1 in an advance segment but it shows the values as 'shopLevel' rather than 'Production' which is what I hoped for, still it is usable.
But to save time I have decided just to create an advanced segment on Host Name which gives me a similar result but without messing with custom variables. Nice of you to include it in the module though, I may need it in the future.
Regards
Mark
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
yamadan
Just to add more details to above post;
The file causing the problem is;
/includes/templates/[your_template]/common/html_header.php
If i remove the code snippet added just before the </head> the site is visable again.
Can other modules be causing a problem?
That's the only difference between my test site & this live site.
A blank site means you have a PHP error somewhere. Make certain that the code is exact for that file from site to site.
The best way to do this is to perform a "winmerge" comparison on the two files. This will show you where there are any differences between the two and likely lead you to your problem.
The other thing you can do is to check your error log file (generated in the cache directory) for the root of the problem (on the live site.) As long as you have that turned on (by default in 1.3.9 + but needs to be added in 1.3.8 and under) you'll get the exact spot that the problem is occurring.
Let me know if that helps.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
cotsweb
Hi Eric,
The following sort of works;
I can use CustomVar 1 in an advance segment but it shows the values as 'shopLevel' rather than 'Production' which is what I hoped for, still it is usable.
But to save time I have decided just to create an advanced segment on Host Name which gives me a similar result but without messing with custom variables. Nice of you to include it in the module though, I may need it in the future.
Regards
Mark
Ok. I thought it might be in the way the code was used (possibly missing one item.) Glad that worked. However, I am going to send you a file (PM me with your email) that I want you to try on your site. This is the revised file with the code moved to a different location so it might work with your original lines (not needing the second push command.)
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
yamadan
Just to add more details to above post;
The file causing the problem is;
/includes/templates/[your_template]/common/html_header.php
If i remove the code snippet added just before the </head> the site is visable again.
Can other modules be causing a problem?
That's the only difference between my test site & this live site.
Hi Yamadan,
I don't know if this is the same problem that I had in a recent install but you could try the following snippet;
Quote:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('google_analytics.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
The only difference between this version and the original is that I have put the full module name 'google_analytics.php' in as the first parameter to get_template_dir(). The original just puts in '.php' for this parameter.
I'm not sure why the original version didn't work for me, I think it should, but it was a quick and simple fix.
Hope this helps
Mark
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
jill8026
Hey Eric, it is definitely set up properly in Analytics ...... I am baffled! :smile:
That is odd Jill. Can you send me the info to get in and look at the site (if you want)? You've got my email from earlier conversations.
I'd be interested in seeing what might be causing that.
What I would be looking for is the GA login as well as the FTP etc... I want to compare files and look at any possible issues in GA setup.
Thanks!
-
Re: Simple Google Analytics - Support
Thanks for quick reply econcepts & cotsweb,
I will try both methods & report back.
-
Re: Simple Google Analytics - Support
Hi,
Thanks for this addon, its working well.
One thing I have notices is that if I change the tracking mode from ga.js to Asyncronous it breaks the "Larger Image" link on all my product pages. Changing it back works fine.
Is this a bug? Can you see if you can replicate it? I am using 1.3.9h + Latest ImageHandler2
Thanks,
Ben
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
cre8ive
Hi,
Thanks for this addon, its working well.
One thing I have notices is that if I change the tracking mode from ga.js to Asyncronous it breaks the "Larger Image" link on all my product pages. Changing it back works fine.
Is this a bug? Can you see if you can replicate it? I am using 1.3.9h + Latest ImageHandler2
Thanks,
Ben
That is interesting Ben.
I haven't seen that or heard it reported.
Can you send me a link to look at?
-
1 Attachment(s)
Re: Simple Google Analytics - Support
Hi Eric,
Its on my store http://www.cuffed.com.au however I don't have a test environment, and I've now reverted back to the ga.js script.
Attached is a zipped word document (limit for word attachment was 19.5kb so I had to zip it) and it shows the screenshot and source code of the pop up window if this helps.
-
Re: Simple Google Analytics - Support
@cre8ive,
I took a look at that doc and it appears that the page is blank (the pop up) because it stops loading at the point where I would assume the GA script is supposed to be.
There is no GA script which is why I believe this to be the case.
If the rest of the site works (and only the pop-up) page is not working (is the only blank page) then I would have to think that the issue resides somewhere in the way the code was inserted.
Without seeing the actual source (php etc...) it's hard to tell the issue. The best bet to find the error is to look at your error log. Can you look at that and tell me what it says?
I am running the async code on a number of sites with IH2 and have no problems.
-
Re: Simple Google Analytics - Support
I had the same problem (possibly?) with images not showing up in the popup. I checked the html source in the browser and it would not load past one point. Commenting out (<!-- -->) the Simple Google Analytics code from the html_header.php allowed the image to load.
Checking the debug log in the cache directory i found the following errors:
[14-Dec-2010 16:32:34] PHP Warning: require(includes/templates/template_default/popup_image/google_analytics.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/infinite/public_html/shopping/includes/templates/template_default/common/html_header.php on line 129
[14-Dec-2010 16:32:34] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/templates/template_default/popup_image/google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/infinite/public_html/shopping/includes/templates/template_default/common/html_header.php on line 129
As a temporary fix i created a sym link between includes/templates/template_default/popup_image/google_analytics.php and includes/templates/template_default/google_analytics/google_analytics.php and everything is working again.
I know this is not a proper fix, let me know if you come up with anything better.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
infinitearms
I had the same problem (possibly?) with images not showing up in the popup. I checked the html source in the browser and it would not load past one point. Commenting out (<!-- -->) the Simple Google Analytics code from the html_header.php allowed the image to load.
Checking the debug log in the cache directory i found the following errors:
[14-Dec-2010 16:32:34] PHP Warning: require(includes/templates/template_default/popup_image/google_analytics.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/infinite/public_html/shopping/includes/templates/template_default/common/html_header.php on line 129
[14-Dec-2010 16:32:34] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/templates/template_default/popup_image/google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/infinite/public_html/shopping/includes/templates/template_default/common/html_header.php on line 129
As a temporary fix i created a sym link between includes/templates/template_default/popup_image/google_analytics.php and includes/templates/template_default/google_analytics/google_analytics.php and everything is working again.
I know this is not a proper fix, let me know if you come up with anything better.
Ok, I see what is going on (thanks for the error log there.)
The popup page is trying to load the google analytics file from the popup directory instead of the proper one. Since the file is not present where it is looking, it errors off leaving you with a blank page.
I'll get that corrected here. Thanks again for that info.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Ok, I see what is going on (thanks for the error log there.)
The popup page is trying to load the google analytics file from the popup directory instead of the proper one. Since the file is not present where it is looking, it errors off leaving you with a blank page.
I'll get that corrected here. Thanks again for that info.
Is there a fix for this? I am having the same problem.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
donhohler
Is there a fix for this? I am having the same problem.
The only fixes I'm aware of is the one posted above with the symbolic link, or just switch to using the ga.js file code. I would really like to use the Asychronous tracking also.
--
Red Baron
-
Re: Simple Google Analytics - Support
Just submitted a new 1.2.4 version of this mod that includes a fix for the popup window issue some have experienced.
If you have 1.2.3 version you do not need to upload any files. All you have to do is take the following action to remedy the situation.
Open the file "html_header.php" file from your template directory 'common' folder (making sure you have the proper location for the template you are using if custom.)
1) Once opened, find the section of code that looks like this (usually just before the closing </HEAD> tag):
Find this:
-------------------------------------------------
Quote:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
And change to this:
--------------------------------------------------
Quote:
<?php
/* Begin Simple Google Analytics */
if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,pop up_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popu p_shipping_estimator')) ) {
//Skip outputting the tracking code as this is a pop-up window
} else { // Print tracking code to page
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
} // end if for page determination
/* End Simple Google Analytics */
?>
That should correct the issue. If you find that any other pages are causing the same issue (I think I got them all) just add that to the array shown here and it will eliminate the problem on those pages.)
If you can' wait for the new version to be activated in the Zen Cart downloads section you can get the newest version from the following link right now:
http://www.zencartoptimization.com/downloads/
Post any issues in this forum.
-
Re: Simple Google Analytics - Support
I love this add-on! Has really helped with my biz! Having one small prob, though - it's not tracking every conversion. Almost all of them but not every one. Maybe one in ten doesn't come through. I can't see any rhyme or reason to it, either. No particular customer, product, or payment method. What could cause this? Right now I have a difference of about $1100 between google and sales reports from within zen. I can see the missing order numbers in analytics.
Help?
-
Re: Simple Google Analytics - Support
nm, i see my answer at post #1318.
-
Re: Simple Google Analytics - Support
Thanks for letting us know you found the answer and what post other can find it at as well. There will always be a slight margin of error with any analytics package you use which utilizes JavaScript (as Google Analytics does).
This is a native issue with the tracking programs, not the module itself.
-
Re: Simple Google Analytics - Support
Hello,
I’ve installed this module a few days ago on our new zc site. (we already had a google analytics account using the Asynchronous code on our old static site.)
- When I set the Asynchronous tracking preference under the admin, the product pages display blank.
- When I set the ga.js tracking under the admin, the product pages display all right but they are not being tracked by google analytics. All other pages seem to get tracked all right.
Do you know what’s wrong?
our site is ezistock(dot)com
Thanks much!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Thannaree
...
- When I set the Asynchronous tracking preference under the admin, the product pages display blank.
- When I set the ga.js tracking under the admin, the product pages display all right but they are not being tracked by google analytics. All other pages seem to get tracked all right.
Do you know what’s wrong?
Thanks much!
Your code is in the wrong area of your page. I also think the onload line is not firing for your pages.
Quote:
Originally Posted by econcepts
...
Open the file "html_header.php" file from your template directory 'common' folder (making sure you have the proper location for the template you are using if custom.)
1) Once opened, find the section of code that looks like this (usually just before the closing </HEAD> tag):
Your code is in the bottom of your pages before the </body> tag.
-
Re: Simple Google Analytics - Support
Quote:
Redbaron2: Your code is in the bottom of your pages before the </body> tag.
Yes its is. I've pasted both codes as indicated on the install instructions. This one is supposed to be pasted there on tpl_main_page.php. Perhaps you're refering to the one to be pasted on html_header.php before </head>...
The body tag on tpl_main_page.php also includes the onload code.
I don't understand why the code doesn't show on the product pages source only.
Do you know what's wrong?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Thannaree
Yes its is. I've pasted both codes as indicated on the install instructions. This one is supposed to be pasted there on tpl_main_page.php. Perhaps you're refering to the one to be pasted on html_header.php before </head>...
The body tag on tpl_main_page.php also includes the onload code.
I don't understand why the code doesn't show on the product pages source only.
Do you know what's wrong?
A blank page means you have an error in your PHP somewhere.
Most likely from something inadvertently altered during install (specifically during the install portion where you had to add the few lines of code to the html header and tpl main page files.)
To correct this you need to find where your error is. To find the erro you should turn on error logging in your cart (if you have zen 1.3.9 + it is already turned on by default.) If you have an older version of zen cart (lower than 1.3.9) you'll need to add the error logging to your site (just a single file) using the following file and instructions.
http://www.zen-cart.com/forum/showthread.php?t=84613
Once you have that in place, just activate the contribution (asyc code if that is what causes the error / white page) and then navigation to the product page. (This will throw the 'white page').
Now go to your server (FTP in) and look at the error log that was just generated in the /cache/ directory (starts with "myDEBUG..."). Download that, open it and read the error message. It should tell you the exact line and location of the error.
Find that section of code and rework it adding the missing element and you should be ready to go.
Let me know if you have any other problems. I'd be happy to walk you through them.