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

Simple Google Analytics - Support

Views: 451,179

Results 921 to 940 of 2,165
25 May 2009, 7:54 AM
#921
thuffam avatar

thuffam

New Zenner

Join Date:
Feb 2009
Posts:
6
Plugin Contributions:
0

Simple Google Analytics - Support

I've had the google analytics mod running for a while just fine. But I notice a week ago that no stats are being received by google. A quick view source of my site (https://www.tracyh.co.nz) reveals that half of the GA javascript is missing eg..

<!--eof- site copyright display -->

<script type="text/javascript"> <!-- if(!pageTracker) { var pageTracker = _gat._getTracker('my-ga-account-no'); pageTracker._initData(); pageTracker._trackPageview(); } //--> </script> </div> <!--bof- parse time display -->

(have replace the ga account no).

I've checked the GA mod code and it's the same as the original.

Any ideas?

Thanks very much
Tim Huffam

25 May 2009, 8:16 AM
#922
thuffam avatar

thuffam

New Zenner

Join Date:
Feb 2009
Posts:
6
Plugin Contributions:
0

Re: Simple Google Analytics - Support

thuffam:

I've had the google analytics mod running for a while just fine. But I notice a week ago that no stats are being received by google. A quick view source of my site (https://www.tracyh.co.nz) reveals that half of the GA javascript is missing eg..

After double checking the code line for line - I found that even though the ga mod code files were the same size - the one on the site looks like it has been hacked - as exactly 296 characters of the file tpl_footer_googleanalytics.php had been replaced with spaces. These ones specifically:
<script type="text/javascript">

<!-- if(!gaJsHost) { 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>

Has anyone else experienced this sort of thing?
Thanks again
Tim Huffam

25 May 2009, 1:29 PM
#923
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

scrap:

First of all, thanks for this support thread!

I've come to a halt in the installation process at step 4, from which I'm to lame proceed. I've put the googleanalytics-INSTALL.sql and googleanalytics-UNINSTALL.sql in /public_html root and all the other files in the right directories (admin, includes etc), but now I actually want to install it. The readme says

When I go to Tools->Install SQL i see, in strong red, NOTE: Zen Cart database-upgrade scripts should NOT be run from this page.. I mean, isn't this exactly what we're doing?

Anyhow, how do I proceed? Do I need to run a SQL query in the upper box?

Heeeelp!

NOTE: Zen Cart database-upgrade scripts
It didn't say you could not run Modules queries. It just trying to warn you about updating the zen cart from there. Just copy and past the Simple Google Analytics sql code there nothing to worry about.

26 May 2009, 5:59 PM
#924
susb8383 avatar

susb8383

Zen Follower

Join Date:
Feb 2008
Posts:
129
Plugin Contributions:
0

Re: Simple Google Analytics - Support

noobuser:

Hello,
What I have done is that I added the analytics code in the header file - i know this is not the best way to do - but it works. I don't know what the implication would be though.

Hi,

I believe the issue is when Google will be called. If the code is put in the footer, the calls are made after your page has already loaded which means the visitor won't notice it.

If it is put in the header, the calls will be made first. So if the Google servers are slow, it will delay your page loading.

29 May 2009, 6:28 AM
#925
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: Simple Google Analytics - Support

artycles:

OK patience is rewarded thanks for the reminder about the time thing. that final tweak must have done the trick it's finally got a tick in the box not an exclamation mark. Now I only need to wait for the figures to come in.:clap:

Can you please tell me what you did to "tweek" your site.

I too have an exclamation mark, and can't get it to recieve. I think I've set everuthing ok in the analytics site, I haven't however set up Goals, all these are still set to Off. Is this a problem??

I'll wait for the prorietory 24 hours and see what occurs.

1 Jun 2009, 4:27 PM
#926
scrap avatar

scrap

Zen Follower

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

Re: Simple Google Analytics - Support

Jeasus I'm getting tired of this! Thanks btw for helping out with the "install" instructions of the code, much appreciated!

Anyhow, the code doesn't show up in my shop. I've read post #888 (and several more). I've narrowed it down, i.e. I know i'm working in the correct file (my_template/custom/tpl_main_page.php), but I can't get it to work anyway. To be, as far as I know, 100% sure I added two comments, namely <!-- A --> and <!-- B --> respectively.

  1. my_template/custom/tpl_main_page.php
<!--eof- banner #6 display -->
<!-- A -->
</body>
<!-- B -->

--> source code

<!--eof- banner #6 display --><!-- A --></body><!-- B --></html>
  1. my_template/custom/tpl_main_page.php
<!--eof- banner #6 display -->
<!-- A -->
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
</body>
<!-- B -->

--> source code

<!--eof- banner #6 display --><!-- A -->

Can someone pleeeease tell me what i'm doing wrong? Since I'm seeing <!-- A --> I have to be editing in the correct file, right?

I'm running 1.3.x and the $zv_onload is there. I'm still able to access the settings via Admin --> Configuration --> Google Analytics. I do not type the code, I copy paste it from the readme.

1 Jun 2009, 4:57 PM
#927
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

scrap:

Jeasus I'm getting tired of this! Thanks btw for helping out with the "install" instructions of the code, much appreciated!

Anyhow, the code doesn't show up in my shop. I've read post #888 (and several more). I've narrowed it down, i.e. I know i'm working in the correct file (my_template/custom/tpl_main_page.php), but I can't get it to work anyway. To be, as far as I know, 100% sure I added two comments, namely <!-- A --> and <!-- B --> respectively.

  1. my_template/custom/tpl_main_page.php
<!--eof- banner #6 display --> <!-- A --> </body> <!-- B --> ``` > > --> source code > > ``` <!--eof- banner #6 display --><!-- A --></body><!-- B --></html> ``` > > 2. my_template/custom/tpl_main_page.php > ``` <!--eof- banner #6 display --> <!-- A --> <?php require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?> </body> <!-- B --> ``` > > --> source code > > ``` <!--eof- banner #6 display --><!-- A --> ``` > > Can someone pleeeease tell me what i'm doing wrong? Since I'm seeing <!-- A --> I have to be editing in the correct file, right? > > I'm running 1.3.x and the $zv_onload is there. I'm still able to access the settings via Admin --> Configuration --> Google Analytics. I do not type the code, I copy paste it from the readme.

A link to your store would help.

1 Jun 2009, 7:18 PM
#928
scrap avatar

scrap

Zen Follower

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

Re: Simple Google Analytics - Support

countrycharm:

A link to your store would help.

Thanks, but no need, it kind of resolved itself :unsure:

For other viewers: i honestly can't tell what was wrong. I had disabled the footer by uncommenting * $flag_disable_footer = true; <br /> * in tpl_footer.php; result: / $flag_disable_footer = true; <br /> /. I un-uncommented (uhm, made it a comment again :cool: ) the line and tried again, but placed the slashes differently; result: / $flag_disable_footer = true;/ <br />. Woilá, it worked. Don't ask me how, but it did.

My current source code:

<!--eof- banner #6 display -->
<!-- A -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxxx-1");
pageTracker._initData();
pageTracker._trackPageview();
</script></body>
<!-- B --></html>
1 Jun 2009, 9:43 PM
#929
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

scrap:

Thanks, but no need, it kind of resolved itself :unsure:

For other viewers: i honestly can't tell what was wrong. I had disabled the footer by uncommenting * $flag_disable_footer = true; <br /> * in tpl_footer.php; result: / $flag_disable_footer = true; <br /> /. I un-uncommented (uhm, made it a comment again :cool: ) the line and tried again, but placed the slashes differently; result: / $flag_disable_footer = true;/ <br />. Woilá, it worked. Don't ask me how, but it did.

My current source code:

<!--eof- banner #6 display --> <!-- A --> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-xxxxxxx-1"); pageTracker._initData(); pageTracker._trackPageview(); </script></body> <!-- B --></html>

Glade you work it out.
5 Jun 2009, 2:19 PM
#930
srigari avatar

srigari

New Zenner

Join Date:
Dec 2008
Location:
USA
Posts:
61
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I have SGA installed and was working fine for some time. Now it is not working - i.e., my stats show '0' all the time.

http:// www. salevalley .com

Can someone familiar with this module help me how to go about it.

Thanks

5 Jun 2009, 5:03 PM
#931
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

srigari:

I have SGA installed and was working fine for some time. Now it is not working - i.e., my stats show '0' all the time.

http:// www. salevalley .com

Can someone familiar with this module help me how to go about it.

Thanks

It does not look like you are using this module by your source code. You have this

<script type="text/javascript"> <!-- var GOOGLE_ANALYTICS_TRACKING_OUTBOUND_LINKS_PREFIX = "/outgoing/"; //--> </script> <script type="text/javascript" src="includes/templates/iC_AthemeV1.3/jscript/googleanalytics_outgoing.js"></script> </head>

<body id="indexBody" onload="googleanalytics_outgoing_init();">

Look total different

<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
5 Jun 2009, 5:16 PM
#932
honrheart avatar

honrheart

Zen Follower

Join Date:
Jul 2008
Posts:
139
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Ok I've followed the instructions in the readme but I still don't get Google to show up under Admin - Configuration. Does anyone know why? I added the following code to the end of tpl_main_page.tpl (the other code was already there), reuploaded that file along with the files in admin & includes and applied the install patch. I am using the template_default. Any suggestions????

6 Jun 2009, 5:27 PM
#933
honrheart avatar

honrheart

Zen Follower

Join Date:
Jul 2008
Posts:
139
Plugin Contributions:
0

Re: Simple Google Analytics - Support

nobody???

12 Jun 2009, 2:51 AM
#934
cufflinks2wear avatar

cufflinks2wear

New Zenner

Join Date:
Aug 2008
Posts:
4
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi! How do I uninstall Simple Google Analytics? Sorry, but I am a noob, so would appreciate a step by step instruction. thank you!

12 Jun 2009, 2:31 PM
#935
noobuser avatar

noobuser

New Zenner

Join Date:
Feb 2009
Posts:
43
Plugin Contributions:
0

Re: Simple Google Analytics - Support

i thought there was unistall sql file -

----- googleanalytics-UNINSTALL.sql ------

SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Google Analytics Configuration';
DELETE FROM configuration WHERE configuration_group_id = @t4 AND configuration_group_id != 0;
DELETE FROM configuration_group WHERE configuration_group_id = @t4 AND configuration_group_id != 0;
DROP TABLE IF EXISTS google_analytics_languages;

hope this helps.

12 Jun 2009, 3:07 PM
#936
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

noobuser:

i thought there was unistall sql file -

----- googleanalytics-UNINSTALL.sql ------

SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Google Analytics Configuration';
DELETE FROM configuration WHERE configuration_group_id = @t4 AND configuration_group_id != 0;
DELETE FROM configuration_group WHERE configuration_group_id = @t4 AND configuration_group_id != 0;
DROP TABLE IF EXISTS google_analytics_languages;

hope this helps.

That just drops it from your store configurations. You will have to go to your phpMyAdmin database to get rid of everything that deals with google analytics.

16 Jun 2009, 6:53 AM
#937
wilkesy avatar

wilkesy

Zen Follower

Join Date:
Jul 2004
Location:
stroud, gloucestershire
Posts:
198
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi,

Ive just installed this also but im not getting anything in the admin area?

Any ideas?

Cheers

16 Jun 2009, 1:26 PM
#938
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

Wilkesy:

Hi,

Ive just installed this also but im not getting anything in the admin area?

Any ideas?

Cheers

If you are just uploading the googleanalytics-INSTALL.sql file thats not the way to do it. You have to copy and past it into your store admin/tools Install SQL Patches. I'm not saying that is what you are doing, but if it is copy and past it.

16 Jun 2009, 3:54 PM
#939
wilkesy avatar

wilkesy

Zen Follower

Join Date:
Jul 2004
Location:
stroud, gloucestershire
Posts:
198
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi,

Thanks for the reply.

i did copy and paste the entire text file into the 'Install SQL pateches' box. i have tried doing it again and still no joy.

Cheers

Paul

16 Jun 2009, 4:11 PM
#940
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

Here are the instruction to install this module. Hope it helps you who are having problems.

Installation Instructions (New Installs ONLY and upgrade from oldest 1.0 version)

NOTE 1: Follow these set of instructions ONLY if you have never had any of the Simple Google Analytics Modules installed.
If you have had any other version (1.0 or 1.1) prior to this, then follow the upgrade instructions for your version.

NOTE 2: 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 yoru 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"

HINT: If you don't know what the directory name is you are using, then you can find it out by following these steps:
		1) Login to your Zen Cart admin
  	2) Go to "Tools > Template Selection" from the menu
  	3) From the screen that shows, look under the column that is titled "Template Directory". The name you find under that column is the
  	   name of the directory that your zen cart site design is running in. This EXACT name is the one that you will use to replace
  	   each instance of "your_template".
  1. After you have identified the directory that your template is running from and determined where you will be uploading the files to,
    upload the included install files and directories to your zen cart site.

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

**** HELPFUL HINT: ****
If you are runnning any of the 1.3.x versions of Zen Cart, this line is already
included with those installs and you can safely skip this step. You may need to check earlier
versions for it though.


<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
  1. 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 require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?>
  1. If this is a BRAND NEW install, you will need to update your database with the googleanalytics.sql file.
    If you are upgrading (from the oldest 1.0 version), you will need to use the SQL file that is called googleanalytics-UPGRADE.sql
    In your site admin go to Tools->Install Sql Patches and apply the googleanalytics.sql patch included.

    NOTE to those upgrading from version 1.1

    If you are upgrading from the previous 1.1 version, then follow the upgrade instructions included for that version located
    in the abvoe section. Do not use these instructions.

    NOTE to those upgrading from version 1.0

    The new "ga.js" version of tracking does not need one bit of JavaScript that was included in the previous "urchin.js"
    versions. You will need to DELETE this line from your code.

includes/modules/pages/checkout_success/on_load_main.js

REMOVE the following line from that file "javascript:__utmSetTrans();"

If that is the ONLY line you see in the file, than it is safe to completely DELETE the file. If this is not the only
line found in that file, then delete only that line, and save the file. Re-upload the new version to your site.
Keeping this line in when using the new ga.js tracking code can causee JavaScript errors to pop up on your site (since
the new code does not refer to this function anymore).


How to use this module

  1. Once you have completed a successful install or upgrade, 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