Zen Cart Logo
Forums / All Other Contributions/Addons / Simple Google Analytics - Support

Simple Google Analytics - Support

Views: 451,119

Results 1,821 to 1,840 of 2,165
17 Apr 2012, 3:30 PM
#1822
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple Google Analytics - Support

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.

17 Apr 2012, 4:05 PM
#1823
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

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?

17 Apr 2012, 4:14 PM
#1824
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple Google Analytics - Support

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.

17 Apr 2012, 4:18 PM
#1825
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Re: Simple Google Analytics - Support

http://www.matequehairproducts.co.uk

Thanks for the quick response - web site URL above.

17 Apr 2012, 4:38 PM
#1826
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple Google Analytics - Support

gcopping:

http://www.matequehairproducts.co.uk

Thanks for the quick response - web site URL above.
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();
17 Apr 2012, 5:02 PM
#1827
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

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.

22 Apr 2012, 12:13 AM
#1828
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

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

22 Apr 2012, 12:30 AM
#1829
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple Google Analytics - Support

A link to your sites would be nice so we could take a peek.

15 May 2012, 5:42 PM
#1830
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

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

15 May 2012, 6:04 PM
#1831
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

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
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.

15 May 2012, 8:10 PM
#1832
notageek avatar

notageek

Zen Follower

Join Date:
Mar 2009
Posts:
418
Plugin Contributions:
0

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?

<?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:

<?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

15 May 2012, 8:36 PM
#1833
yaro avatar

yaro

New Zenner

Join Date:
Apr 2012
Posts:
15
Plugin Contributions:
0

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) - https://www.aptekarus.com

Thanks in advance for any help!

15 May 2012, 8:38 PM
#1834
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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.

15 May 2012, 8:48 PM
#1835
yaro avatar

yaro

New Zenner

Join Date:
Apr 2012
Posts:
15
Plugin Contributions:
0

Re: Simple Google Analytics - Support

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?

16 May 2012, 12:10 AM
#1836
enviousgems avatar

enviousgems

New Zenner

Join Date:
Nov 2010
Posts:
37
Plugin Contributions:
0

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 ??
https://www.shopenviousgems.com

TIA

16 May 2012, 12:22 AM
#1837
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

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
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');
}
?>

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
/* 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 */
?>

16 May 2012, 12:33 AM
#1838
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple Google Analytics - Support

What version of the Simple Google Analytics tracking are you using?

16 May 2012, 1:43 AM
#1839
enviousgems avatar

enviousgems

New Zenner

Join Date:
Nov 2010
Posts:
37
Plugin Contributions:
0

Re: Simple Google Analytics - Support

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 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
<?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 /* 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
16 May 2012, 1:44 AM
#1840
enviousgems avatar

enviousgems

New Zenner

Join Date:
Nov 2010
Posts:
37
Plugin Contributions:
0

Re: Simple Google Analytics - Support

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.