-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
They should"t allow it in my opinion but I did say
And I still stand by that. If Eric want s to change it back his welcome to. I didn't want to take no credit or step on his feet here. My name is on the new submission I made. I will change it back though.
The only point I was making was that I didn't realize that you had submitted the latest version since Eric's name was still listed as the author.. 'tis all..:smile: Really.. it's not a big deal..:smile:
BTW, there's no such thing as "stepping on toes" for open source. If an update/bugfix is needed, submit it.. Heck Scott has submitted Super Orders fixes, and I HARDLY felt like he was stopping on anyone's toes.. That said, if there's a concern about "stepping on toes" that you should contact the author and work it out with them..
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
DivaVocals
The only point I was making was that I didn't realize that you had submitted the latest version since Eric's name was still listed as the author.. 'tis all..:smile: Really.. it's not a big deal..:smile:
BTW, there's no such thing as "stepping on toes" for open source. If an update/bugfix is needed, submit it.. Heck Scott has submitted Super Orders fixes, and I HARDLY felt like he was stopping on anyone's toes.. That said, if there's a concern about "stepping on toes" that you should contact the author and work it out with them..
Point taken
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
Point taken
:hug:...
-
Re: Simple Google Analytics - Support
We just launched our site www.aydincoins.com but having trouble with Google Analytics, when I do a view Page Source of our site, I see the code at the bottom of the page, within the body and Google Analytics is still not recognizing the site, it says Tracking is not installed.
Here is the code below from our site, I just Xed the account numbers, the module is working in Zencart.
Any idea?
<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-XXXXXXXX-4");
pageTracker._initData();
<!-- Google Code for AydinCoinsSite Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "hwCECPCW7QIQ3KHj_gM";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/page...n.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/page...t=0"/>
</div>
</noscript>
pageTracker._trackPageview();
pageTracker._trackPageLoadTime();
</script>
</body></html>
-
Re: Simple Google Analytics - Support
Well, if you look at the source code on your page and in the G Analytics part it actually, has:
alt=""
Then you're not doin it right.
the " is an html entity replacement for "
I'm not sure what you might have done to convert the "
to ".
but that's broken.
-
Re: Simple Google Analytics - Support
How did you place the UA code into your zencart installation?
When you set up a GA account at Google, it will generate a few lines of code, which it then says need to be pasted into your HTML...
If you use one of the zencart GA modules, you DON'T paste this code anywhere...
All you need is your tracking number.
Describe HOW you configured GA on your site.
-
Re: Simple Google Analytics - Support
I thought I had this working but GA reports "Tracking Not Installed" for https://www.canadianbusinessresource...hase/index.php
ZC 1.3.9h
Simple GA 1.2.5b
Source View within </heading>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
(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>
The only odd thing is the line <!--simple google analytics--> just before the </body> tag.
Please help me sort out what I have done wrong.
-
Re: Simple Google Analytics - Support
I just checked common/tpl_main_page.php and see
<!--simple google analytics-->
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
</body>
have I combined old & new install methods?
Please advise
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
polygone
I just checked common/tpl_main_page.php and see
<!--simple google analytics-->
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
</body>
have I combined old & new install methods?
Please advise
If you were running zen cart v1.3.9 and simple google analytics v1.2.4, v1.2.5 everything should be correct in your insulation. Nothing has been change in simple google analytics v1.2.5a, simple google analytics v1.2.5b, simple google analytics v1.2.5c except I created and upgrade folder and created a upgrade.txt file. so this would be easier for the installer.
NOTE: If you were using a previous version (1.2.x) of Google Analytics (prior to 1.2.3) then you'll need to change the code in the previous location
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Find the lines of code that look like this (found below) just before the </body> tag:
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');
}
?>
CHANGE / replace the lines of code to look like this:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
Hope this helps.
-
Re: Simple Google Analytics - Support
So would anyone be able to provide the code to properly setup Bing AdCenter Conversion tracking. Earlier in the thread Eric said you needed to use an "if, then" statement similar to one used for google and just substitute the code provided by AdCenter...anyone know how to go about this?
-
Re: Simple Google Analytics - Support
Polygone,
It's probably obvious to you, but since a comment above says you don't paste the code in your html, it may be worth pointing out that you must go to the Admin for Simple Google Analytics and enter your Google Analytics code there.
-
Re: Simple Google Analytics - Support
Still puzzling over what could be the problem when my functioning Google Analytics just stopped working on one site but not another, so that on my non-working site when I "view source," I cannot see the GA code.
Is there some way to identify what has changed or what could have changed to make the code disappear in "view source" when it plainly is still in the html header and body files as it was when it was working?
Do I just go through the header and body files line by line in comparison with prior versions using WinMerge? Should I assume something in these files is suddenly broken, or would there be some add-on that interferes? For example, I added the Link Exchange module to my two sites, one of which still shows GA in "view source." Is WinMerge the only possible avenue of investigation? Am I on the right process track?
Notageek
-
Re: Simple Google Analytics - Support
I am trying to install Simple Google Analytics Version: 1.2.5c on Zencart v1.5.0. However when I get to trying to find tpl_main_page.php in includes/templates/my_template/common I find that it does not exist. I found a post saying that this may happen and I should put the code in includes/templates/my_template/common/tpl_header.php but this php file does not contain any body tages and the readme file says the code needs to go before the </body> tag. So now I don't know what to do - can anyone help with this?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
gcopping
I am trying to install Simple Google Analytics Version: 1.2.5c on Zencart v1.5.0. However when I get to trying to find tpl_main_page.php in includes/templates/my_template/common I find that it does not exist. I found a post saying that this may happen and I should put the code in includes/templates/my_template/common/tpl_header.php but this php file does not contain any body tages and the readme file says the code needs to go before the </body> tag. So now I don't know what to do - can anyone help with this?
If you don't have a copy of the tpl_main_page.php in your includes/templates/my_template/common grab one from the zen cart templates/template_default/common and put it in includes/templates/my_template/common.
-
Re: Simple Google Analytics - Support
Thanks for the help - but if I do that will it not affect the template my site is using as it obviously doesn't need this file, and what will it do when it finds it?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
gcopping
Thanks for the help - but if I do that will it not affect the template my site is using as it obviously doesn't need this file, and what will it do when it finds it?
What template are you using?
-
Re: Simple Google Analytics - Support
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
gcopping
Thanks for the help - but if I do that will it not affect the template my site is using as it obviously doesn't need this file, and what will it do when it finds it?
The Ashley Pink template is using the zen cart templates/template_default/tpl_main_page.php. Just get the tpl_main_page.php out of zen cart templates/template_default and upload it to your includes/templates/my_template/common after you insert the Simple Google Analytics code.
-
Re: Simple Google Analytics - Support
Thanks I have finished the installation and done everything else in the install notes, however my Google Analytics account is still saying "Tracking not installed" after I have done the check status. I have a redirection on the domain name to the folder where Zencart is installed could this be causing this problem?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
gcopping
Thanks I have finished the installation and done everything else in the install notes, however my Google Analytics account is still saying "Tracking not installed" after I have done the check status. I have a redirection on the domain name to the folder where Zencart is installed could this be causing this problem?
If you would share your web site link with us we might be able to see whats going on.
-
Re: Simple Google Analytics - Support
http://www.matequehairproducts.co.uk
Thanks for the quick response - web site URL above.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
gcopping
The code for Simple Google Analytics is OK on your site. See below. I would just give it sometime to collect data. I see nothing wrong on your site. You may have entered the wrong info on Google end. I don't know.
<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 src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-42");
pageTracker._initData();
pageTracker._trackPageview();
pageTracker._trackPageLoadTime();
-
Re: Simple Google Analytics - Support
Thanks for checking I will give it a bit of time and then get back to you if it is still not collecting anything.
-
Re: Simple Google Analytics - Support
I'm still trying to see why when I click "view source" one of my sites shows the Google Analytics data, but my second site doesn't show any of the Simple Google Analytics code at all.
Since the includes/templates/mytemplate/common/html_header.php and tpl_main_page.php are the same for both sites in terms of the Simple Google Analytics installation, would any other file in that common folder be relevant to the "view source" reading the Simple Google Analytics code?
Are their any ways to debug this?
Notageek
-
Re: Simple Google Analytics - Support
A link to your sites would be nice so we could take a peek.
-
Re: Simple Google Analytics - Support
Countrycharm,
Thank you if you want to look at my site's view source. My site is www.g o k a r a o k e m a c h i n e.com. (I add spaces so that a google search for the site by name will not bring up this post.) My webstats show 350 to 400 visitors a day but Google Analytics just reads zero (I have basically no sales, however, for 2012.) I have taken the sub-domain out of maintenance mode for at least a couple of months now, but that has made no difference.
I don't expect you to really put time into this problem, but any suggestions will be followed. I'm considering just deleting the test sub-domain, and then trying to get Google's attention to index the site. I do not know if it ever was indexed.
Notageek
-
Re: Simple Google Analytics - Support
You have not installed Simple Google Analytics right. Go back and install it again being careful that all files are named and uploaded in there right places.
Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
includes this code.
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Copy and paste the following lines of code (found below) just before the </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
1. Once you have completed a successful install, login to your Zen Cart admin and go to configuration->google analytics configuration and set your google
analytics account number and any of the other settings as you see fit.
2. Login to your Google Analytics account and make sure your site is set to "receiving data"
or "waiting for data" (this means you have sucessfully installed the analytics code on your
site.)
3. To take advantage of Google Analytics E-Commerce Tracking, you must login to your Google
Analytics account after installing this contribution and enable e-commerce reporting as follows:
a. Log in to your account.
b. Click "Edit" next to the profile you'd like to enable.
c. On the Profile Settings page, click "edit" next to Main Website Profile Information.
d. Change the E-Commerce Website radio button from No to Yes.
e. Save your changes
I hope this will help.
-
Re: Simple Google Analytics - Support
Hi, Countrycharm, thanks very much for your help.
So far, I have checked the installed code that used to work, and I am wondering why the code you mention is not the same; and also, why you have not mentioned the code that is in the html_header.php file.
In my tpl_main_page.php file I have this code--is it really wrong if it used to work?
Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?></body>
In my html_header.php file I have the following code:
Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?></head>
<?php // NOTE: Blank line following is intended: ?>
Secondly, following your suggestion, I tried to see if my site was receiving tracking, and although so far I cannot see where to edit my site data, I saw that it says "Tracking not installed."
I'm still trying to see where to find out how to install the tracking in Google Analytics, because in my site it does have the tracking code entered in Admin, and it used to track. I now recall that I did change the Google Analytics view to the new version, and am wondering if that has any relationship to losing ability to track my site.
I will just keep looking around the Google Analytics site to see if I can get somewhere. At the moment it takes me everywhere but where the answers are, it seems. I will let you know if I get somewhere with this problem, but in the meantime just have the curiosity about why my tracking code is different from the one you suggest, and why you do not mention the html_header.php tracking code.
Notageek
-
Re: Simple Google Analytics - Support
Hello everybody!
I install this Google Analytics on my ZenCart website, 1.3.9, and it seemed that it was installed correctly - at least the "Google Analytics Configuration" appeared in the "Configuration" menu and I was able to insert my GA account number into it. But then it stuck - GA says that ...Tracking Not Installed... and I checked the Page Source - GA tracking code was not there... What did I do wrong?
The website (I have just launched it) - www.aptekarus.com
Thanks in advance for any help!
-
Re: Simple Google Analytics - Support
Yaro,
There are a few more steps you need to follow, including some file edits. Go back through the instructions, you'll find the steps you missed.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
jeking
Yaro,
There are a few more steps you need to follow, including some file edits. Go back through the instructions, you'll find the steps you missed.
Jeking, thank you!
I've did everything according to the installation manual, including file changes, I added this code into tpl_main_page.php:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
</body>
And I installed the SQL patch (uploaded a file through the ZC admin)
Why the GA code is not showing now?
-
Re: Simple Google Analytics - Support
Ok, didn't want to go through all these pages, but maybe someone can point out if there is something wrong with my google analytics ??
www.shopenviousgems.com
TIA
-
Re: Simple Google Analytics - Support
Let me say this to you. Since version 1.2.5 the html_header.php is no longer needed. The code for Simple Google Analytics in that file can be deleted. Here is the upgrade instruction to get it to work for your site. Yes the change in code is needed.
************************************************************
************************************************************
************************************************************
Author: Eric Leuenberger (Zen ID: econcepts) http://www.ecommerceamplifier.com
Contribution Name: Simple Google Analytics
Version Date: v 1.2.5c 04/13/2012
Updated By: CountryCharm
License: under the GPL - See attached License for info.
************************************************************
Designed for: Zen Cart v1.5.0.
************************************************************
-------------------------------------------------------------------------
UPGRADING FROM PREVIOUS VERSIONS OF SIMPLE GOOGLE ANALYTICS:
--------------------------------------------------------------------------
!!!BACKUP!!! ALWAYS MAKE SURE YOU HAVE AN UP TO DATE BACKUP OF YOUR FILES and MySQL DATABASE BEFORE INSTALLING
You should test this on TEST SITE before going live!!!!!!!
--------------------------------------------------------------------------
Upgrading Simple Google Analytics from 1.3x compatible version to v1.5.0 ready version.
1. Unzip the contribution.
2. Open the zen_1.5.0 and then the upgrade folder.
3. Change the admin folder name to match the name of your custom directory and ftp to your sever.
4. Run the included 1-5-0_upgrade.sql using the Zen-Cart Sql Patches tool (admin -> tools -> install sql patches)
For best results, copy-and-paste the code into the query field and press 'Send'.
Delete the files in admin/includes/boxes/extra_boxes/ (these files are now obsolete and should be deleted in their entirety!!)
5. NOTE: If you were using a previous version (1.2.x) of Google Analytics (prior to 1.2.3) then you'll need to change the code in the previous locations
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Find the lines of code that look like this (found below) just before the </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
CHANGE / replace the lines of code to look like this:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
6.) In Version 1.2.5 a new override file is being used so there are a few lines of code you need to remove from a file (altered in previous versions) on your site.
This override file prevents the need for altering the 'html_header.php" file (as in some earlier versions.)
After uploading all files to the server do the following:
6a) Open the file found at: /includes/templates/[your_template]/common/html_header.php
6b) Find the lines that look like this just before the </head> tag and REMOVE them (delete). Save the file and re-upload to your server.
PHP Code:
<?php
/* Begin Simple Google Analytics */
if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_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 */
?>
--------------------------------------------------------------------------
-
Re: Simple Google Analytics - Support
What version of the Simple Google Analytics tracking are you using?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
Let me say this to you. Since version 1.2.5 the html_header.php is no longer needed. The code for Simple Google Analytics in that file can be deleted. Here is the upgrade instruction to get it to work for your site. Yes the change in code is needed.
************************************************************
************************************************************
************************************************************
Author: Eric Leuenberger (Zen ID: econcepts)
http://www.ecommerceamplifier.com
Contribution Name: Simple Google Analytics
Version Date: v 1.2.5c 04/13/2012
Updated By: CountryCharm
License: under the GPL - See attached License for info.
************************************************************
Designed for: Zen Cart v1.5.0.
************************************************************
-------------------------------------------------------------------------
UPGRADING FROM PREVIOUS VERSIONS OF SIMPLE GOOGLE ANALYTICS:
--------------------------------------------------------------------------
!!!BACKUP!!! ALWAYS MAKE SURE YOU HAVE AN UP TO DATE BACKUP OF YOUR FILES and MySQL DATABASE BEFORE INSTALLING
You should test this on TEST SITE before going live!!!!!!!
--------------------------------------------------------------------------
Upgrading Simple Google Analytics from 1.3x compatible version to v1.5.0 ready version.
1. Unzip the contribution.
2. Open the zen_1.5.0 and then the upgrade folder.
3. Change the admin folder name to match the name of your custom directory and ftp to your sever.
4. Run the included 1-5-0_upgrade.sql using the Zen-Cart Sql Patches tool (admin -> tools -> install sql patches)
For best results, copy-and-paste the code into the query field and press 'Send'.
Delete the files in admin/includes/boxes/extra_boxes/ (these files are now obsolete and should be deleted in their entirety!!)
5. NOTE: If you were using a previous version (1.2.x) of Google Analytics (prior to 1.2.3) then you'll need to change the code in the previous locations
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Find the lines of code that look like this (found below) just before the </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
CHANGE / replace the lines of code to look like this:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
6.) In Version 1.2.5 a new override file is being used so there are a few lines of code you need to remove from a file (altered in previous versions) on your site.
This override file prevents the need for altering the
'html_header.php" file (as in some earlier versions.)
After uploading all files to the server do the following:
6a) Open the file found at: /includes/templates/[your_template]/common/html_header.php
6b) Find the lines that look like this just before the </head> tag and REMOVE them (delete). Save the file and re-upload to your server.
PHP Code:
<?php
/* Begin Simple Google Analytics */
if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_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 */
?>
--------------------------------------------------------------------------
^^^ Is this for me ?? LOL
I had someone else do this for me a few months ago. So I don't understand this at all.
But i guess I can show that person the above...
Thank you
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
What version of the Simple Google Analytics tracking are you using?
Where would I find that Info ??
Like I said above, had someone else do it for me. She got me set-up / started and I just put up my products on the site and fill orders.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Hi, Countrycharm, thanks very much for your help.
So far, I have checked the installed code that used to work, and I am wondering why the code you mention is not the same; and also, why you have not mentioned the code that is in the html_header.php file.
In my tpl_main_page.php file I have this code--is it really wrong if it used to work?
Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?></body>
In my html_header.php file I have the following code:
Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?></head>
<?php // NOTE: Blank line following is intended: ?>
Secondly, following your suggestion, I tried to see if my site was receiving tracking, and although so far I cannot see where to edit my site data, I saw that it says "Tracking not installed."
I'm still trying to see where to find out how to install the tracking in Google Analytics, because in my site it does have the tracking code entered in Admin, and it used to track. I now recall that I did change the Google Analytics view to the new version, and am wondering if that has any relationship to losing ability to track my site.
I will just keep looking around the Google Analytics site to see if I can get somewhere. At the moment it takes me everywhere but where the answers are, it seems. I will let you know if I get somewhere with this problem, but in the meantime just have the curiosity about why my tracking code is different from the one you suggest, and why you do not mention the html_header.php tracking code.
Notageek
OK I figured out how to use the reply now....lol This is for you.
Quote:
Originally Posted by
countrycharm
Let me say this to you. Since version 1.2.5 the html_header.php is no longer needed. The code for Simple Google Analytics in that file can be deleted. Here is the upgrade instruction to get it to work for your site. Yes the change in code is needed.
************************************************************
************************************************************
************************************************************
Author: Eric Leuenberger (Zen ID: econcepts)
http://www.ecommerceamplifier.com
Contribution Name: Simple Google Analytics
Version Date: v 1.2.5c 04/13/2012
Updated By: CountryCharm
License: under the GPL - See attached License for info.
************************************************************
Designed for: Zen Cart v1.5.0.
************************************************************
-------------------------------------------------------------------------
UPGRADING FROM PREVIOUS VERSIONS OF SIMPLE GOOGLE ANALYTICS:
--------------------------------------------------------------------------
!!!BACKUP!!! ALWAYS MAKE SURE YOU HAVE AN UP TO DATE BACKUP OF YOUR FILES and MySQL DATABASE BEFORE INSTALLING
You should test this on TEST SITE before going live!!!!!!!
--------------------------------------------------------------------------
Upgrading Simple Google Analytics from 1.3x compatible version to v1.5.0 ready version.
1. Unzip the contribution.
2. Open the zen_1.5.0 and then the upgrade folder.
3. Change the admin folder name to match the name of your custom directory and ftp to your sever.
4. Run the included 1-5-0_upgrade.sql using the Zen-Cart Sql Patches tool (admin -> tools -> install sql patches)
For best results, copy-and-paste the code into the query field and press 'Send'.
Delete the files in admin/includes/boxes/extra_boxes/ (these files are now obsolete and should be deleted in their entirety!!)
5. NOTE: If you were using a previous version (1.2.x) of Google Analytics (prior to 1.2.3) then you'll need to change the code in the previous locations
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Find the lines of code that look like this (found below) just before the </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
CHANGE / replace the lines of code to look like this:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
6.) In Version 1.2.5 a new override file is being used so there are a few lines of code you need to remove from a file (altered in previous versions) on your site.
This override file prevents the need for altering the
'html_header.php" file (as in some earlier versions.)
After uploading all files to the server do the following:
6a) Open the file found at: /includes/templates/[your_template]/common/html_header.php
6b) Find the lines that look like this just before the </head> tag and REMOVE them (delete). Save the file and re-upload to your server.
PHP Code:
<?php
/* Begin Simple Google Analytics */
if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_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 */
?>
--------------------------------------------------------------------------
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Enviousgems
Ok, didn't want to go through all these pages, but maybe someone can point out if there is something wrong with my google analytics ??
www.shopenviousgems.com
TIA
Quote:
Originally Posted by
countrycharm
What version of the Simple Google Analytics tracking are you using?
I would download the latest Google Analytics and install it.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
I would download the latest Google Analytics and install it.
Thanks, it's on my list for the person that will be doing my 1.5 Upgrade :D
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Yaro
Hello everybody!
I install this Google Analytics on my ZenCart website, 1.3.9, and it seemed that it was installed correctly - at least the "Google Analytics Configuration" appeared in the "Configuration" menu and I was able to insert my GA account number into it. But then it stuck - GA says that ...Tracking Not Installed... and I checked the Page Source - GA tracking code was not there... What did I do wrong?
In order not to duplicate my post, I'm just replying myself to it. Still, looking forward to get some help from gurus of ZenCart!
ZC version - 1.3.9, Google addon - 1.5, I installed it successfully, everything went fine until I saw in GA that "Tracking Not Installed"... how this may happen!? What should be my next steps? De-install the Google Analytics addon? how? Or re-install it? PLS, HELP. My site - Aptekarus.com
Thank you in advance.
The website (I have just launched it) - www.aptekarus.com
Thanks in advance for any help!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Yaro
Jeking, thank you!
I've did everything according to the installation manual, including file changes, I added this code into tpl_main_page.php:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
</body>
And I installed the SQL patch (uploaded a file through the ZC admin)
Why the GA code is not showing now?
Make sure you Change the "admin" and "your_template" folder name to match the name of your custom directory and ftp upload to your sever.
Where ever you see the words "your_template" (in either these instructions, or the file folders included with the install)
you should REPLACE that with the directory name that your template is running from. So for example, if you are running a
custom template and the directory that you decided to keep those template files in is called "mycustomtemplate" then, where ever
you see the words "your_template", you would change it to "mycustomtemplate".
If you are using the default template provided with zen cart, then you would replace each instance of "your_template" with the
following: "template_default"
Make sure you insert this code in the body tag in /includes/templates/[your_template]/common/tpl_main_page.php
At the bottom just before the closing </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
The code is not installed on your site yet. Follow the direction for it to show when you view source at the bottom of the page.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
Make sure you Change the
"admin" and
"your_template" folder name to match the name of your custom directory and ftp upload to your sever.
Where ever you see the words
"your_template" (in either these instructions, or the file folders included with the install)
you should REPLACE that with the directory name that your template is running from. So for example, if you are running a
custom template and the directory that you decided to keep those template files in is called "mycustomtemplate" then, where ever
you see the words
"your_template", you would change it to "mycustomtemplate".
If you are using the default template provided with zen cart, then you would replace each instance of
"your_template" with the
following: "template_default"
Make sure you insert this code in the body tag in /includes/templates/[
your_template]/common/tpl_main_page.php
At the bottom just before the closing </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
The code is not installed on your site yet. Follow the direction for it to show when you view source at the bottom of the page.
Thanks so much! I made sure to upload all necessary files to appropriate directories, and now GA code IS installed on my site (www.aptekarus.com), but Google Analytics says that 'CODE NOT INSTALLED'!!!!! How on Earth can this happen?
Pls, see below the part of the source code of my website with the code installed:
Copyright © 2012 <a href="http://aptekarus.com/index.php?main_page=index" target="_blank">APTEKARUS.COM - Russian Holistic Pharmacy in USA</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>
<!-- =============================== -->
</div>
<div><!-- {%FOOTER_LINK} --></div>
</div>
</div>
</div>
<!--bof- parse time display -->
<!--eof- parse time 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-31755790-1");
pageTracker._initData();
pageTracker._trackPageview();
pageTracker._trackPageLoadTime();
</script>
</body></html>
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Yaro
Thanks so much! I made sure to upload all necessary files to appropriate directories, and now GA code IS installed on my site (
www.aptekarus.com), but Google Analytics says that 'CODE NOT INSTALLED'!!!!! How on Earth can this happen?
Pls, see below the part of the source code of my website with the code installed:
Copyright © 2012 <a href="http://aptekarus.com/index.php?main_page=index" target="_blank">APTEKARUS.COM - Russian Holistic Pharmacy in USA</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>
<!-- =============================== -->
</div>
<div><!-- {%FOOTER_LINK} --></div>
</div>
</div>
</div>
<!--bof- parse time display -->
<!--eof- parse time 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-31755790-1");
pageTracker._initData();
pageTracker._trackPageview();
pageTracker._trackPageLoadTime();
</script>
</body></html>
Yes the code is now installed on your site.
Now go check and make sure you have everything set up right on Google Analytics. Make sure you have setup your Account Settings and Profile Settings correctly.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
countrycharm
Yes the code is now installed on your site.
Now go check and make sure you have everything set up right on Google Analytics. Make sure you have setup your Account Settings and Profile Settings correctly.
Thanks to everyone! Now GA shows "Receiving Data"!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Yaro
Thanks to everyone! Now GA shows "Receiving Data"!
Your very welcome.
-
Re: Simple Google Analytics - Support
Thanks to everyone who already asked questions and equally to those who gave so many excellent answers.
Installed and working fine (I think) just need some traffic and conversions to test it.
Install on Zen cart v 1.5 fresh install with a renewed cleansed database, which was one of the biggest issues I faced with this as the uninstall script did not seem to remove all of the tables and data from the older version I had install on Zen cart 1.3.9.
Thanks again for every one involved.
-
Re: Simple Google Analytics - Support
Countrycharm,
You asked:
Quote:
What version of the Simple Google Analytics tracking are you using?
I have Simple Google Analytics version 1.2.3 installed on my Zencart 1.3.9h. It works in one store but not the other. I will carry out your instructions when I have a bit more time and will let you know the result.
Thanks very much.
Notageek
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Countrycharm,
You asked:
I have Simple Google Analytics version 1.2.3 installed on my Zencart 1.3.9h. It works in one store but not the other. I will carry out your instructions when I have a bit more time and will let you know the result.
Thanks very much.
Notageek
Yes when you get the time to upgrade to v1.2.5c and follow post 1833 you will be OK.
-
Re: Simple Google Analytics - Support
I'm useless for not having the code in front of me but I just finished updating from 1.3.9h to 1.5 and was having issues with the upgrade SQL file. I had to edit the query manually to add my table prefixes. I'm hardly fluent in MySQL and can't tell if the included query attempts to compensate for this? At any rate, once I tweaked it, I had no problems.
-
Re: Simple Google Analytics - Support
Ok so I followed all the instructions in the install.txt except for in my templates folder was no TPL_Main_Page.php... only a header and footer... so I skipped that step and went to admin tools sql patch... I opened the install sql file copied the entire file and pasted to the query box. I hit send. It returned a query result showing me exactly the same code I posted but didnt say anything about errors. But it also didnt say successful or anything like that... my site didnt break I just need to know if analytics is now fully functional and is there a way for me to test that it is?
-
Re: Simple Google Analytics - Support
does nobody read this forum?
-
Re: Simple Google Analytics - Support
You're proving to be quite a cheeky fellow...:D. Nobody has a right to DEMAND answers on this forum - even "implied" demands.
Please remember that ALL HELP GIVEN HERE is given for FREE and in good faith. Be patient - or hire a coder to assist you if you don't like these policies.
---------------------------------------------------------------------
HOW you install this module will depend on what VERSION of ZC you are using.
If you do not have tpl_main_page.php in your CUSTOM folder (see the module's install.txt instructions) then you need to PUT A COPY of that file into that folder.
Then, you EDIT that COPIED file to put in the lines of code indicated in the instructions.
I trust you have your site's UA-XXXXXXX code ? (That is inserted into the database using the configuration tools for GA in your admin area.)
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
schoolboy
You're proving to be quite a cheeky fellow...:D. Nobody has a right to DEMAND answers on this forum - even "implied" demands.
Please remember that ALL HELP GIVEN HERE is given for FREE and in good faith. Be patient - or hire a coder to assist you if you don't like these policies.
---------------------------------------------------------------------
HOW you install this module will depend on what VERSION of ZC you are using.
If you do not have tpl_main_page.php in your CUSTOM folder (see the module's install.txt instructions) then you need to PUT A COPY of that file into that folder.
Then, you EDIT that COPIED file to put in the lines of code indicated in the instructions.
I trust you have your site's UA-XXXXXXX code ? (That is inserted into the database using the configuration tools for GA in your admin area.)
Quote:
Originally Posted by
nightshadow
does nobody read this forum?
I agree with Schoolboy!
With that said if you would go back a page or two and read some post I gave, you might just find out how to install this. If you still have problems afterwards I will try to help.
-
Re: Simple Google Analytics - Support
Countrycharm,
I took the time to upgrade my 1.2.3 to version 1.2.5c of Simple Google Analytics, which basically consisted of removing the code from my includes/templates/mytemplate/common/html_header.php file.
I still cannot see the Simple Google Analytics in my site when I view source, and it is not tracking. I do have the header still installed on my www.m u s i c s t u d i o s t o r e.com website, and it still works.
I followed the following advice, and chose the upgrade. I am running Zen Cart version 1.3.9. Maybe there is actually more to the upgrade than deleting code from the header. Did I miss something?
Quote:
Originally Posted by
countrycharm
Yes when you get the time to upgrade to v1.2.5c and follow
post 1833 you will be OK.
One further question relating to Google Analytics itself: I have been trying as a next point of attack to try to figure out exactly when the Google Analytics stopped working on www.g o k a r a o k e m a c h i n e.com, but I cannot figure out how to choose a date range within Google Analytics to obtain this information. There is no calendar showing in the upper right of my Google Analytics screen, and I have searched all morning for how to choose/change the date range.
Do you know how the date range may be changed in the new version of Google Analytics? Perhaps I should go back to the old version where I had this date change capability.
Thanks.
Notageek
-
Re: Simple Google Analytics - Support
Well, it helps to finally ask a question, because I finally found how to change the date range in the new version of Google Analytics by going to the old version and seeing how that looked.
It turns out the new version removes the date range box so it is pretty far above the hour/day/week/month box. It is by clicking the actual date range box that the calendar comes up. I do not know why it was so hard to figure out in the new version, and I still do not see the option in the menu, but maybe I will find it based on seeing the old version.
Notageek
-
Re: Simple Google Analytics - Support
Well, once I had identified the date one of my sites stopped showing the Google Analytics code in view source and consequently in Google Analytics, I was able to isolate what I was doing when GA stopped showing, which was to install a module. I actually installed the module on both of my sites, but one site is still being tracked in Google Analytics. I checked the files in that module, and the includes/templates/mytemplate/common/tpl_main_page.php was not changed.
The module works on both websites, so I know it is not the module itself (Links Manager by the wonderful Clyde Jones).
The Links Manager module does have a .sql file, and I recall I did have a bit of trouble installing the .sql file on the site with my current GA problem, and figured out that problem before smoothly installing it on my second site.
I thought I would be able to compare files and find the error. but I am not sure what I would compare. I compared the tpl_main_page.php file with my backup before the GA stopped showing, and they are the same.
In trying to recall what the .sql glitch was, it might have been some wording in the php version that had changed from the prior php version. I'm not sure, though.
So, my question is whether I really should try to just compare all pre-problem files with the current files, maybe starting with the Links Manager files, or whether there is some procedure for looking at the .sql database for some conflicting data. I am having trouble visualizing a system other than just a total review of all website files through WinMerge, pre-problem and post-problem.
Does anyone have an opinion as to whether I am on the right track?
Notageek
-
Re: Simple Google Analytics - Support
I have the latest version of zencart and set up everything per the instructions along with some instructions only found in the forums (for the missing tab in the configuration drop down list). My only problem is not seeing historical data in google analytics. I only see the analytics work when I select the Real-Time Beta option. But everything else is just 0 or not logged. Does anyone have experience with this?
-
Re: Simple Google Analytics - Support
Your install.txt reads: "NOTE 1: Follow these set of instructions ONLY if you have never had any of the Simple Google Analytics Modules installed."
What if you HAVE had a previous version of Simple Google Analytics Modules installed?
-
Re: Simple Google Analytics - Support
Never mind. Dumb question.
-
Re: Simple Google Analytics - Support
I have tried using this new_installation files for my zencart site (running v1.5) but google analytics does not detecting my tracking code. I'm certain i followed the steps correctly however the on_load_main.js does not exist in the folder you said it will in the text instructions, I did find it in the login folder but it did not have the line you specified anyway? my site is worldwideweb . i n n a t e s t r e e t w e a r . com.au have any ideas what i have done wrong here? I also have tried setting the tracking to asynchronous and also to its default in the admin settings which has not change anything, I also tried pasting the custom code from the analytic settings page into the custom tracking code area in GA settings.
-
Re: Simple Google Analytics - Support
Hi, I'm not sure whether anyone has already answered this question but I have been searching through the threads for hours and can't seem to find anything,
I'm also not sure which google analytics mod our original site developer uploaded to our store as I have also found forum threads about the a_berezin mod.
Now to our issue, hope someone can clarify for me,
I was speaking with google about our adwords acount this week and they told me our analytics code is in the wrong place!
That currently the code is placed just before the </body> tag,
and that a few weeks ago they changed this so that it should be placed
Quote:
2. Paste this code on your site
Copy the following code, then paste it onto every page that you want to track immediately before the closing </head> tag
url: http://www.clicknorder.co.uk
Can anyone clarify this for me?
I am wondering whether my original site developer had installed the a_berezin mod and now I need to uninstall and reinstall this new mod simple google analytics instead?
Thanks in advance
-
Re: Simple Google Analytics - Support
I just downloaded this simple google analytics mod and compared the files to what is currently on my site and it does seem to be the same, it looks like i have version 1.2.3 on my site and it seems that the latest is version 1.2.5
So can anyone answer my question regarding the positioning of the google analytics code?
I read some earlier posts by 'Cuda' who stated that he had wanted to amend the original mod by a_berezin so that the code is now placed just before the closing </body> tag instead of just before the closing </head> tags as this would mean your store is at risk of going down.
But now it seems that google ask you to place before the closing </head> tag??
Any help gratefully appreciated
thanks
-
Re: Simple Google Analytics - Support
Palagio,
It appears from a bit of web research that placement of the code may be either in the head or the body, just before the closing tag (</head> or </body>). I did see that Google is now stating:
Quote:
Once you find the code snippet, copy and paste it into your web page, just before the closing </head> tag*. If your website uses templates to generate pages, enter it just before the closing </head> tag in the file that contains the <head> section. (Most websites re-use one file for common content, so it's likely that you won't have to place the code snippet on every single page of your website.)
The placement is designed to avoid conflict with other scripts. Google Analytics states, after advising to place the code in the head section:
Quote:
For the best performance across all browsers we suggest you position other scripts in your site in one of these ways:
1. before the tracking code snippet in the <head> section of your HTML
2. after both the tracking code snippet and all page content (e.g. at the bottom of the HTML body)
Google then explains that the change from body to head sections is due to the code being now asynchronous:
Quote:
One of the main advantages of the asynchronous snippet is that you can position it at the top of the HTML document. This increases the likelihood that the tracking beacon will be sent before the user leaves the page. It is customary to place JavaScript code in the <head> section, and we recommend placing the snippet at the bottom of the <head> section for best performance.
Quote:
You'll notice one key difference between placements of the asynchronous tracking code and the traditional tracking snippet:
the asynchronous snippet is placed at the bottom of the <head> section of your HTML file or template.
the traditional snippet is placed at the bottom of your page, just before the closing </body> tag.
Because the asynchronous tracking snippet can execute without blocking other code or content, we recommend placing it at the bottom of the <head> section for the best tracking results.
Apparently, there are certain things that can conflict with Google Analytics and the recommendation to place the asynchronous code in the head is to avoid such conflicts, and also capitalize on the apparent speed of the asynchronous code to capture visits even if the visitor leaves before a "script-heavy" page is loaded, or before someone with a slow connection decides to leave the page.
I read somewhere that if the tracking code is placed in the body, more data is tracked even though some viewers who do not stay for the full loading of the page are not tracked.
The Simple Google Analytics version 1.2.3 placed the code in both head and body. It would be interesting to learn why the 1.2.5c eliminated the code in the head, and what the logic of the module actually is.
It looks like Google Analytics actually supports either placement, currently, from the above quotes, which are on the Google Analytics installation/placement instructions.
Notageek
-
Re: Simple Google Analytics - Support
I'm still trouble-shooting why my Google Analytics code disappeared shortly after I installed the Links Manager module by Clyde Jones (Deceased). Google Analytics continued tracking my second website.
Today I uninstalled the Links Manager Module, and reinstalled it. In the process, I found a couple of things were not working correctly in Admin, and that's when I realized that the most basic difference between both of my version 1.3.9h websites is that my karaoke site is bilingual (English and Spanish). I had hurriedly installed the Links Manager and had not taken the time to create the Spanish language files that would parallel the English files.
Today, I did the work of translating and adding the Spanish language equivalent files in Links Manager. I can see that things that did not work well before I did that are now working better, if not perfectly. There are a couple of problems with tables in PHPMyAdmin not showing the Spanish versions of the files.
It looks like I will be going to the Links Manager thread to see if someone can shed light on this situation. If I learn what is interfering with Simple Google Analytics, I will post the information here.
Thanks for the help so far.
Notageek
-
Re: Simple Google Analytics - Support
Hi again. My query to the Link-Manager forum was futile, as no one has mentioned failure of Google Analytics in all of those voluminous pages and I anticipate no reply. So far today I tried to debug my home page using Firefox with Firebug and Google Chrome's ga.debug.js Google Analytics debugger, but since the code I am using is asynchronous from Simple GA version 1.2.5c, it does not quite fit the debug instructions.
No errors are coming up. The view source just completely omits the Google Analytics script which does show up in my nonbilingual site.
I tried placing the code just before the </head> tag, and it still does not show up in the View Source, even though it is in both that position and also just before the </body> position which used to track.
I'll just keep plugging away, I guess. It seems kind of hopeless right now.
Notageek
-
Re: Simple Google Analytics - Support
Just to add to the mystery of the disappearing Google Analytics code on my bilingual website, on visiting Google Analytics yesterday I saw that I had 1 visitor from Bogota, Columbia on 6/12/12. That's the sole visitor recorded since GA stopped being tracked. Of course, my webstats show many visitors, and everytime I go online there are several people on the page.
Notageek
-
Re: Simple Google Analytics - Support
Hi. I had previously upgraded from 1.2.3 to 1.2.5c to try to regain my GA code when it stopped suddenly. Today I uninstalled Simple GA and performed a new installation, and now I can see the script where it should be at the bottom of the includes/templates/mytemplate/common/tpl_main_page.php, when I "view source" on right click of the page.
I feel sure it will start tracking again, as nothing has been changed in www.google.analytics.com, which has always said it is tracking.
On comparing the 1.2.5c files with the 1.2.3 files, there are 2 items that I did not have installed: the jscript folder and the jscript_google_analytics.php file within that folder. Otherwise, the file structure was the same.
I did need to change the TYPE=MyISAM to ENGINE=MyISAM in the googleanalytics_INSTALL.sql, because that language has been changed as of PHP 5.1.
I hope my troubles have benefitted someone.
Notageek
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Hi. I had previously upgraded from 1.2.3 to 1.2.5c to try to regain my GA code when it stopped suddenly. Today I uninstalled Simple GA and performed a new installation, and now I can see the script where it should be at the bottom of the includes/templates/mytemplate/common/tpl_main_page.php, when I "view source" on right click of the page.
I feel sure it will start tracking again, as nothing has been changed in
www.google.analytics.com, which has always said it is tracking.
On comparing the 1.2.5c files with the 1.2.3 files, there are 2 items that I did not have installed: the jscript folder and the jscript_google_analytics.php file within that folder. Otherwise, the file structure was the same.
I did need to change the TYPE=MyISAM to ENGINE=MyISAM in the googleanalytics_INSTALL.sql, because that language has been changed as of PHP 5.1.
I hope my troubles have benefitted someone.
Notageek
Quote:
On comparing the 1.2.5c files with the 1.2.3 files, there are 2 items that I did not have installed: the jscript folder and the jscript_google_analytics.php file within that folder. Otherwise, the file structure was the same.
No wonder it didn't work and show up on your page. Always make sure all files uploaded correctly.
Quote:
I did need to change the TYPE=MyISAM to ENGINE=MyISAM in the googleanalytics_INSTALL.sql, because that language has been changed as of PHP 5.1.
The MyISAM in googleanalytics_INSTALL.sql in version 1.2.5c the type will default to what ever =MyISAM your sever is running. I left it blank on purpose to do that. That was change back in March, 2012.
-
Re: Simple Google Analytics - Support
Can someone please help me. I've been struggling with installing this addon for a couple days now. I've tried to read the instructions and follow them and figure things out on my own but I am not getting anywhere.
I think there is an obvious step I am missing or I have assumed something incorrectly. I have a new website for a college class I am setting up. I am trying to install Google Analytics using this addon, but apparently I am making a bit of a mess of things.
Which directory should I be installing from? I have the entire unzipped package sitting in my /zencart directory. Should I have uploaded it to the template directory? I'm somewhat lost on where this should be at on my server.
My admin directory is named adminurrhtcqq so i changed the file name from "admin" to "adminurrhtcqq"
My template is "classic" but it seems to have only a color of green for the default temple. I tried running the SQL using both temple names.
Nothing seems to happen, at least when I look at the admin configuration menu in the zencard admin tool, the google analytics does not appear as an option.
If one of you guys could help me I would really appreciate it.
-
Re: Simple Google Analytics - Support
Hi,
I installed this module and almost everything works.
E-commerce tracking records just sales payed with bank transfer.
I also have Paypal Payment and sales payed with paypal don't work.
I think the reason is that customer makes the transaction on paypal and not on my website...
I searched around in many threads and tutorials and I've seen somebody to edit two files:
includes/templates/template_default/template/tpl_checkout_success_default.php
includes/templates/custom_template/template/tpl_checkout_confirmation_default.php
Is this Solution compatible with Simple Google Analytics Module ?
Help me please...
-
Re: Simple Google Analytics - Support
Now it works.
the problem is that after paying with paypal the user has to redirect to checkout success page otherways Analytics won't track the Purchase.
-
Re: Simple Google Analytics - Support
Wow, the included installation file has to be the worst one I have seen!
Step 2
Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
includes this code (if not see trouble shooting below it is not neccassary but an addition
to your template needs to be made):
Ok...what code?
-
Re: Simple Google Analytics - Support
I give up. I cannot install this with the shoddy instructions!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
kezerb
I give up. I cannot install this with the shoddy instructions!
Quote:
Wow, the included installation file has to be the worst one I have seen!
Well, keep in mind that this mod is FREE so bashing the developer is not usually the easiest way to get support. I understand you're frustrated with the installation instruction but there's a better way to communicate that than how you're going about it. Obviously, there are 1,000s of site using this successfully (including ours) so the installation instruction cannot be that bad.
Which version of the mod are you trying to install? 1.2.5c? Which version of Zen Cart are you running? 1.3.9 or 1.5.0?
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
kezerb
Wow, the included installation file has to be the worst one I have seen!
Step 2
Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
includes this code (if not see trouble shooting below it is not neccassary but an addition
to your template needs to be made):
Ok...what code?
Quote:
Originally Posted by
kezerb
I give up. I cannot install this with the shoddy instructions!
Quote:
Originally Posted by
BlessIsaacola
Well, keep in mind that this mod is FREE so bashing the developer is not usually the easiest way to get support. I understand you're frustrated with the installation instruction but there's a better way to communicate that than how you're going about it. Obviously, there are 1,000s of site using this successfully (including ours) so the installation instruction cannot be that bad.
Which version of the mod are you trying to install? 1.2.5c? Which version of Zen Cart are you running? 1.3.9 or 1.5.0?
Here here!!! Absolutely not the right way to go about asking for help around here..:no: While the instructions are not the best, they aren't that unclear either.. As you pointed out 1000s of other site couldn't be running this add-on if they were COMPLETELY unclear..:smile:
That said to address kezerb's issue this should help:
Quote:
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php copy and paste the following lines of code just before the </body> tag:
Code:
<!--bof- Google Analytics Code -->
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
<!--eof- Google Analytics Code -->
If your template doesn't include this file simply copy it from the default_template folder to your template. (See Zen Cart FAQs on the template override system if you need an explanation why you need to do it this way)
-
Re: Simple Google Analytics - Support
Figured I would post this updated information here.
This might be important if you pay attention to google analytics bounce rate. I utilize several comparison shopping engines and some shoppers hit the one item, read the description, etc. and leave. While 'technically' a bounce, it isn't really.
Google has updated their analytics code to allow for better tracking in these types of situations.
Here is the article posted on Googles blog with the code.
The updated code is in BOLD.
Link to original article.
Tracking Adjusted Bounce Rate In Google Analytics
Wednesday, July 25, 2012 | 9:00 AM
Labels: Code and Configuration
Have you ever wondered how many visitors really pay attention to your website before exiting the page? Have you wondered how many of those “bounced” visitors will remember where they’ve been in future? How many of them are totally useless, how many are not?
There is a way to track this!
“Bounce rate” in Google Analytics is one of the key metrics that helps to evaluate the quality of your traffic. “Bounce” happens when the visitor exited the website right from the landing page, without going to any other page. This is a great indication on how relevant the content was for the user and how engaged they were with your website.
While working perfect for most websites, there are categories of sites where this metric is not enough.
Imagine you’re promoting a blog post that describes all the benefits of your company. The visitor might read the whole post and remember your company and products really well - they might even go to search for your product on one of the search engines straight away. However, since the visitor only looked at 1 page (exactly where the blog post is) they will be recorded as bounced visitor.
Another example if you have a description of the product right on the landing page, and your phone number on the same page. The visitor might study the description and call straight away - again, they will be recorded as a bounced visitor, as only 1 page was viewed. There are many more examples, and even traditional websites may benefit from the method described below as opposed to the standard bounce rate.
There is a solution to this - something that we call “Adjusted bounce rate”. You implement a small tweak to your Google Analytics code, which executes an event when a user has spent over a certain amount of time on the webpage. Depending on the website, the time can range from 10 seconds to few minutes - you should decide for yourself the amount of time you consider the user to be sufficiently engaged with your website or product.
Once the event is executed, the visitor is no longer counted as “bounce,” even though no additional pageview is recorded. This will mean your bounce rate will show users who have not spent a required “minimal time” on your website - the ones who have really bounced. Here is a modification to the Google Analytics code that you need to make (on the example of the latest, asynchronous code):
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-1']);
_gaq.push(['_trackPageview']);
setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);
(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>
The setTimeout function is the one that does the trick here, and you can set it up to whatever delay you wish (in this case, it is 15 seconds).
Moreover, since the event is created once 15 seconds lapse, you can define this event as a goal in Google Analytics, and even import this goal as a conversion to AdWords, provided the conditions are met.
We hope this small fix will allow you to track and understand the users’ behavior and quality of the traffic coming to your website more accurately, and make more informed decisions. One thing website owners should be vary of, though, that not only the function may slow down the users' experience, even insignificantly, but will also increase the volume of hits your site sends to Google Analytics, which might bring your usage over the limit (currently set at 10 mln hits per month). As such, this fix should only be applied when necessary and justified by the concept of the website and the landing pages.
Posted by Alexey Petrov, Google Analytics Insights Team
-
Re: Simple Google Analytics - Support
In regards to the above article, It looks like it should be added to /includes/templates/<my template>/googleanalytics/google_analytics.php around line 107/108
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);
but this has not been tested yet.
-
Re: Simple Google Analytics - Support
Limitless... Awesome data.. thanks for sharing!!
-
Re: Simple Google Analytics - Support
Hi,
Thank you for this module. I have installed and configured (a new install - never installed on our site before), but I have some questions that I can't find answers to in this thread. I'm sure they must be here somewhere but I'm struggling to find them.
Very simply, we want to track the cart value of each conversion. As I understand it, this module will allow us to do this.
I have stripped out all our old analytics code which was in html_header.php (this was where we put it prior to installing this module).
I have stripped out all our old analytics conversion tracking code which was in define_checkout_success.php (this was where we put it prior to installing this module)
I have added the code for this module as instructed to tpl_main_page.php
In the config section I have ...
1) added our Analytics Account ID
2) activated AdWords tracking
3) added our Google AdWords Conversion Tracking Number
Questions...
1) Google Tracking Code Type To Use ... which type do we use to best achieve what we want to do (that is, record the cart value)?
2) Add Custom Tracking After Main Analytics Code? ... do I need to enter something here to get AdWords to capture the cart value?
3) Is there anything else we need to do to be able to record the cart value of each conversion? For example, at present in our Google AdWords account under Tools & Analysis > Conversions, we have defined a conversion type for 'value of order' and entered a "Conversion value" which is currently set to "order_total" so Google knows what it is looking for.
We are using 1.3.9h
Thanks
-
Re: Simple Google Analytics - Support
Sorry I should add that I'm asking on behalf of our marketing agency. They have just taken over management of our AdWords campaigns but need to know what the zen cart "cart value" identifier is so they can properly track the value of each conversion. They thought it was "order_total" but we're not sure.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
BlessIsaacola
Well, keep in mind that this mod is FREE so bashing the developer is not usually the easiest way to get support. I understand you're frustrated with the installation instruction but there's a better way to communicate that than how you're going about it. Obviously, there are 1,000s of site using this successfully (including ours) so the installation instruction cannot be that bad.
Which version of the mod are you trying to install? 1.2.5c? Which version of Zen Cart are you running? 1.3.9 or 1.5.0?
I am the original developer. The latest mod here was updated with new instructions etc... by another zen cart contributor. I have been in the process of adding new features to the module that extend it even further, and am also updating the install instructions to be more clear. It seems to have got confusing for a few with the new setup that was contributed.
In any event, the new version is going to be 1.2.6 and it has been tested on a number of sites. Working well (with new functionality for Google Adwords Remarketing, Google Trusted Stores, and early stages for Google Experiments (formerly Google Website Optimizer.)
Just finishing up the instructions etc.. here and hope to have this newest version uploaded within the week. Then I'll be back to support this mod again here (been quite busy the last year or so.)
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Dunk
Sorry I should add that I'm asking on behalf of our marketing agency. They have just taken over management of our AdWords campaigns but need to know what the zen cart "cart value" identifier is so they can properly track the value of each conversion. They thought it was "order_total" but we're not sure.
I manage a lot of AdWords campaigns for people as well, and this module will 'out of the box' track all conversion values (within Adwords) without flaw. All you have to do is turn on "conversion tracking" from the admin of your cart and add the "Adwords ID" (provided by Adwords when you click to 'get the conversion code') into the space provided (again, in the admin of your cart.)
There should be no need for them to know the order_total etc... as the module does that all dynamically for them. All they need to do is look at the reports provided by AdWords (if you want data in your Analytics on Adwords you need to link to the two accounts together within your GA end) to see what converts and what doesn't.
Let me know if that helps.
-
Re: Simple Google Analytics - Support
Hi,
I installed this mod into www.recleads.com
It's showing up on the view source and when I go in to Google Analytics live version I can see when I'm on the website. When I go to reporting however it says no people have visited the site.. any insight would be appreciated!
Thanks
-
Re: Simple Google Analytics - Support
Google does not update in real time (except for the "real time beta" reports which only show you basics of who is on site.) To get actual reporting you need to wait a bit for them to update. They typically update a few times a day and then you should see the visit in your actual stats.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Google does not update in real time (except for the "real time beta" reports which only show you basics of who is on site.) To get actual reporting you need to wait a bit for them to update. They typically update a few times a day and then you should see the visit in your actual stats.
Thanks for your assistance, I installed it 2 days ago and it still says no visitors :no:
-
Re: Simple Google Analytics - Support
My Tracking Status says "Receiving Data" too so I assume it's supposed to be working...
-
Re: Simple Google Analytics - Support
that does mean it is working. Might just take time for Google's side to pick it up. I've heard of this before with others.
Make sure you have the exact same Analytics ID in the Admin of Zen as you see in your Analytics account. If you have a different one, the traffic may be going into that account instead.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
that does mean it is working. Might just take time for Google's side to pick it up. I've heard of this before with others.
You were right it's kicked in! :yes::yes: Thanks for your help :laugh:
-
Re: Simple Google Analytics - Support
Hi all, I have a strange problem with this module.
Everything was perfect, I've this mod installed for years, now on a 1.3.8, always updated with no problem at all.
Since the august 1, all my website is running fine, except the order confirm page. It hungs on "Your order is been processed, Please wait" for about 7 minutes, then all goes right, the order is correct and analytics register the conversion as normal. But you know, many customers press the back button, or close the page after some minutes, and replace orders again and again until they notice that many confirm email are yet in their mailbox.
Someone has noticed this issue? Ideas..?
Thanks!
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Savvonet
Hi all, I have a strange problem with this module.
Everything was perfect, I've this mod installed for years, now on a 1.3.8, always updated with no problem at all.
Since the august 1, all my website is running fine, except the order confirm page. It hungs on "Your order is been processed, Please wait" for about 7 minutes, then all goes right, the order is correct and analytics register the conversion as normal. But you know, many customers press the back button, or close the page after some minutes, and replace orders again and again until they notice that many confirm email are yet in their mailbox.
Someone has noticed this issue? Ideas..?
Thanks!
What other tracking code do you have on your Order Success page? I do not seen this problem on any sites I manage.
-
Re: Simple Google Analytics - Support
The instructions say to put the code before the </body> tag.
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Copy and paste the following lines of code (found below) just before the </body> tag:
This was the case a few years ago but these are the current instructions.
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag.
I've installed per the instructions but wondered about the discrepancy.
Thanks
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
2Geckos
The instructions say to put the code before the </body> tag.
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Copy and paste the following lines of code (found below) just before the </body> tag:
This was the case a few years ago but these are the current instructions.
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag.
I've installed per the instructions but wondered about the discrepancy.
Thanks
If you look a few posts back you will see that it's been acknowledged that the instructions in the currently available version has a few issues/discrenpancies.. you may ignore the erroneous instructions.. The only "every page" you want to copy the code into is the "/includes/templates/[your_template]/common/tpl_main_page.php".
-
Re: Simple Google Analytics - Support
Ran into a major problem with my install (installed 1.2.5.c on 1.5), it's not receiving tracking and my website won't load now. I get a blank page, favicon and title load, but nothing else. WTF
I have to agree though, I've never had a problem installing any modules and the writeup on this could be a lot better.
I uploaded all the correct files, renamed all the directories to match my admin and template. CHECK. At the bottom of tpl_main_page, before the closing body tag, I added the code. CHECK. Ran the SQL Install code, no errors, said everything went fine. I see the option now in my config. This is where I get confused though-what is this mention about a 'ga.js' file? This is directly after the SQL step. I looked and I don't even have that file in question and the only file in my checkout success folder is a header file, so what is this about?
So I pretty much did everything correctly and now my site is down. What do i do???
-
Re: Simple Google Analytics - Support
This sounds like an issue with something else on your site that is affecting the order process or the order confirmation page. The module should not have this type of effect at all.
-
Re: Simple Google Analytics - Support
Follow the old instructions. They are the correct ones.
This module was updated recently by another zenner, and during that transition, the instructions were re-written. I am in the process of releasing an new version with added updates and will be reverting the instructions to a more clear set as well.
Do not post the code to every page on the site. That is incorrect.
-
Re: Simple Google Analytics - Support
A blank page means you have an error in your PHP somewhere. Typically this is caused when trying to insert any of the lines needed to run the module and on in removes or replaces code by accident. The new instructions are very unclear and are being re-written in my next release to go back to the previous way.
For the time being, I would revert your changes to the previous files, then start again following the instructions in the old version (just before the 1.5 upgrade version was uploaded.) You will need to register the pages with the 1.5 admin, but the instructions on what you need to do are more clear with the older install.
Let me know if that helps.
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
A blank page means you have an error in your PHP somewhere. Typically this is caused when trying to insert any of the lines needed to run the module and on in removes or replaces code by accident. The new instructions are very unclear and are being re-written in my next release to go back to the previous way.
For the time being, I would revert your changes to the previous files, then start again following the instructions in the old version (just before the 1.5 upgrade version was uploaded.) You will need to register the pages with the 1.5 admin, but the instructions on what you need to do are more clear with the older install.
Let me know if that helps.
Sorry, a little confused. How can I get the older version, and what version is that one? I ended up getting my site to show up again though but I had to delete all of the files that got uploaded. I made sure that when copied the code into my body that I didn't copy over any existing code. Is that ga.js file supposed to be in my checkout success folder? Why wouldn't it be? I haven't even touched any of those files.
-
Re: Simple Google Analytics - Support
Yes, I saw that (went to your site via the PM you sent me.)
The install should be actually very easy (but with the current instructions is seems to be more difficult.)
I would recommend installing the version 1.2.5 -- no 'b' / 'c' version. (look lower in the downloads area of the zen cart section).
This one is identical to the others but it has easier to understand instructions. The only things you will need to be aware of (if running 1.5) is that you will still need to register the pages in the admin (not included in the instructions for 1.2.5 as that was not available during the initial writing.)
OR, you can use my newest version here (I have yet to upload) which covers it all plus some new items.
There should be nothing in the way of ga.js anywhere in your download. My packages do not contain that at all. The code is automatically generated for you so no worries on that. Just upload a few files (2 or so) add one line of code to the tpl_main_page.php file, and your all set.
It you still have issues or want me to help you with it, just let me know (PM me again.)
Again, very quick install (prior to the 1.5 upgrade version that went into place I was told it was one of the easiest and pain free installs. )
-
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Yes, I saw that (went to your site via the PM you sent me.)
The install should be actually very easy (but with the current instructions is seems to be more difficult.)
I would recommend installing the version 1.2.5 -- no 'b' / 'c' version. (look lower in the downloads area of the zen cart section).
This one is identical to the others but it has easier to understand instructions. The only things you will need to be aware of (if running 1.5) is that you will still need to register the pages in the admin (not included in the instructions for 1.2.5 as that was not available during the initial writing.)
OR, you can use my newest version here (I have yet to upload) which covers it all plus some new items.
There should be nothing in the way of ga.js anywhere in your download. My packages do not contain that at all. The code is automatically generated for you so no worries on that. Just upload a few files (2 or so) add one line of code to the tpl_main_page.php file, and your all set.
It you still have issues or want me to help you with it, just let me know (PM me again.)
Again, very quick install (prior to the 1.5 upgrade version that went into place I was told it was one of the easiest and pain free installs. )
Link to new version???
-
Re: Simple Google Analytics - Support
Ok so I went through the older versions install and copied everything over, ran the SQL but I dont see the Analytics option under my config menu in the admin. I saw some earlier posts in this thread about registering it in the admin but when I go to myPHPadmin and run the query I don't get anything back, it says it can't find it something. Is it a problem if I run the SQL install commands more than once? It doesn't seem to be putting that info in..so I'm kind of stuck...