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

Simple Google Analytics - Support

Views: 451,067

Results 141 to 160 of 2,165
11 May 2007, 3:23 PM
#141
cuda avatar

cuda

Zen Follower

Join Date:
Jul 2006
Posts:
119
Plugin Contributions:
0

Simple Google Analytics - Support

DMservices:

Hi Cuda, afraid im struggling to install simple analytics - am running zen 1.3.7 with MySQL 5.0.27-standard. Added both the files and edited tpl_main_page. then ran the sql script.
No menu option is appearing for me under admin/configuration and i get the following error on homepage:

Warning: require(includes/templates/Dan/index/google_analytics.php) [function.require]: failed to open stream: No such file or directory in /home/dsmeek/public_html/includes/templates/Dan/common/tpl_main_page.php on line 180

Fatal error: require() [function.require]: Failed opening required 'includes/templates/Dan/index/google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dsmeek/public_html/includes/templates/Dan/common/tpl_main_page.php on line 180

Any help appreciated and please take into account that my hosts are shocking and could have messed with db etc without me knowing!

thanks very much & sorry if this has already been covered elsewhere - its a big thread!

Dan

Try dumping the google_analytics.php file into the includes/templates/Dan/index/ folder.... why do you have an index folder in your template is it required for another mod?

One more side note if you use Jrox affilate manager they tell you to add a folder to your custom template named "checkout_success" you would also need to add google_analytics.php to that folder for it to function on the checkout success page.

Let us know if that works....

12 May 2007, 1:36 PM
#142
dmservices avatar

dmservices

New Zenner

Join Date:
Feb 2006
Posts:
21
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi Cuda,

yes it was for a small mod to 'bookmark us' - have no idea why it was in the index folder though! have removed it and the error message has gone - thanks! However i still have no option in the configuration menu - should this have kicked in from running the sql script? if so could you tell me which table to look for so i can see if it's worked?

thanks again

14 May 2007, 9:36 AM
#143
dmservices avatar

dmservices

New Zenner

Join Date:
Feb 2006
Posts:
21
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Good news! Forgot that i had the 'admin profiles' mod installed and therefore needed to activate any new addition. Ive got the menu now so hopefully it will be all good from here.

cheers,

Dan

14 May 2007, 11:25 AM
#144
saraniel avatar

saraniel

New Zenner

Join Date:
Mar 2007
Posts:
29
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi Cuda,

Just a quick question:
When I add new products and categories in my shop, is simple google Analytics going to reference those new addings ?

Best regards,

Saraniel

16 May 2007, 6:27 PM
#145
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Ooops, I just posted this in the other Google Analytics thread and I was reading and saw this is the thread with the active mod so I figured this would be a more appropriate place to ask my question (sorry for double post)...

I just signed up for Google Analytics. My question is: What's the difference between this mod and just directly inserting the google tracking script code into the template/common/html_header.php file?

16 May 2007, 7:12 PM
#146
cuda avatar

cuda

Zen Follower

Join Date:
Jul 2006
Posts:
119
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Saraniel:

Hi Cuda,

Just a quick question:
When I add new products and categories in my shop, is simple google Analytics going to reference those new addings ?

Best regards,

Saraniel

The code is dynamic and will showup on all your product pages

17 May 2007, 12:30 PM
#147
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

davemehta:

Ooops, I just posted this in the other Google Analytics thread and I was reading and saw this is the thread with the active mod so I figured this would be a more appropriate place to ask my question (sorry for double post)...

I just signed up for Google Analytics. My question is: What's the difference between this mod and just directly inserting the google tracking script code into the template/common/html_header.php file?

I posted this reply to you in the other thread as well. Here it is in case you didn't get that one...

There is no difference (the mod makes it easier without the need to "touch code" from within the Admin).

By the way, I would recommend that if you are going to insert the code yourself, then don't insert it into the header file. I would recommend inserting it into the "tpl_main_page.php" found in the "common" folder (includes/templates/[your template]/common ).

That is the better place to put it (and the spot that the Simple Google Analytics inserts it).

I have inserted the Google Analytics code (along with e-com tracking and conversion tracking) on older carts just by pasting into the bottom as indicated here. Again, the mod provided makes it a bit easier. (Why not take the "easy route")?

17 May 2007, 12:58 PM
#148
gottoast avatar

gottoast

New Zenner

Join Date:
Jan 2007
Posts:
7
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hello I have a question about which file you check in step 2 of the readme. I am using the default template so my structure looks like:

cart/includes/template/template_default

I do not see a file in that template_default directory where they would be a body tag...as described in the readme:

  1. Make sure your body tag in includes/templates/[your_template] includes this code (if not see trouble shooting below it is not neccassary but an addition to your template needs to be made):

anyone help point me to the right file to double check I have everything else except that.

Thanks-Khris

PS - I am using 1.37

18 May 2007, 4:20 AM
#149
robax avatar

robax

Zen Follower

Join Date:
Mar 2006
Posts:
187
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Look for this file:
includes/templates/template_default/common/tpl_main_page.php

If one is using a different template then change "template_default" to the name of your template.

That should get you on track.
Rob

18 May 2007, 11:51 AM
#150
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

gottoast:

cart/includes/template/template_default

PS - I am using 1.37

1.37 Already has this line in it, so you should be OK. However, as robax said, if you want to look at the file, look in your "common" folder.

18 May 2007, 10:05 PM
#151
dtb avatar

dtb

New Zenner

Join Date:
Apr 2005
Posts:
47
Plugin Contributions:
0

Re: Simple Google Analytics - Support

dreamdaily:

Just in case someone is still on 1.2.x and wants to implement the Google Analytics:

Here is what needs to be done on 1.2.x:

  1. Install the Mod like described in the README file.
  2. Modify the core file /includes/classes/db/sql/query_factory.php:

a) Find around line 268

function queryTime() {
return $this->total_query_time;
}

}

b) Add right AFTER the function queryTime() and BEFORE the second curly brace the following code from the 1.3.x version of this file.
The final result looks like this:

function queryTime() {
return $this->total_query_time;
}

function getBindVarValue($value, $type) {
$typeArray = explode(':',$type);
$type = $typeArray[0];
switch ($type) {
case 'csv':
return $value;
break;
case 'passthru':
return $value;
break;
case 'float':
return (!zen_not_null($value) || $value=='' || $value == 0) ? 0 : $value;
break;
case 'integer':
return (int)$value;
break;
case 'string':
if (isset($typeArray[1])) {
$regexp = $typeArray[1];
}
return ''' . $this->prepare_input($value) . ''';
break;
case 'noquotestring':
return $this->prepare_input($value);
break;
case 'currency':
return ''' . $this->prepare_input($value) . ''';
break;
case 'date':
return ''' . $this->prepare_input($value) . ''';
break;
case 'enum':
if (isset($typeArray[1])) {
$enumArray = explode('|', $typeArray[1]);
}
return ''' . $this->prepare_input($value) . ''';
default:
die('var-type undefined: ' . $type . '('.$value.')');
}
}
/**

  • method to do bind variables to a query
    **/
    function bindVars($sql, $bindVarString, $bindVarValue, $bindVarType, $debug = false) {
    $bindVarTypeArray = explode(':', $bindVarType);
    $sqlNew = $this->getBindVarValue($bindVarValue, $bindVarType);
    $sqlNew = str_replace($bindVarString, $sqlNew, $sql);
    return $sqlNew;
    }

function prepareInput($string) {
return @mysql_real_escape_string($string);
}
}

It seems to be working without a glitch on the 1.2.5 code.

All the best,
--dreamdaily

hi all...

i just followed these steps as i'm running 1.2.4 and it doesn't seem to be working.

Before doing the additional change that dreamdaily suggests, it all functioned properly, but on Google Analytics it said i wasn't configured properly, and wasn't set up yet...

I then tried dreamdaily's suggestion for 1.2.x users, and i couldn't load a single thing (admin or catalog) as it said there was an error in my query_factory file...
any suggestions cuda?

19 May 2007, 1:16 AM
#152
tomato avatar

tomato

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Simple Google Analytics - Support

If someone could help me with this it would be greatly appreciated. I have tried several times to get Google Analytics working. I have installed according to the readme and put my account number in admin. I am currently using Zen-Cart version 1.3.5 my site is located at http://www.japanshopdirect.com

Thank you for your time and any help/advice that you can offer me.

19 May 2007, 1:48 AM
#153
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

tomato:

If someone could help me with this it would be greatly appreciated. I have tried several times to get Google Analytics working. I have installed according to the readme and put my account number in admin. I am currently using Zen-Cart version 1.3.5 my site is located at http://www.japanshopdirect.com

Thank you for your time and any help/advice that you can offer me.

What seems to be the problem? I went to the site and did a "view source". The code shows Google Analytics installed? Here is the end of your page:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1873077-5";
urchinTracker();
</script></body></html>

What makes you think it isn't working?

19 May 2007, 1:51 AM
#154
tomato avatar

tomato

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Simple Google Analytics - Support

When I log in to my Google Analytics account I get this:

"Tracking for your website has not yet been validated: https://www.japanshopdirect.com
Click 'Check Status' to validate whether or not you have added tracking correctly to your website's home page. Clicking the 'Check Status' will also provide instructions for adding tracking to your website."

But I have am pretty sure I have followed all of the steps. This seems like an easy thing to integrate into my site but I cant put my finger on why it isn't working.

19 May 2007, 4:46 AM
#155
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

You have to click on "check status" for Google to make sure your code is on the page. Once that is complete, the message will turn to "Waiting / Receiving for data..." in your Google Account.

SO, you are close, but Google can't gathering data to track if you haven't told it the code is present yet. See?

19 May 2007, 4:49 AM
#156
tomato avatar

tomato

New Zenner

Join Date:
Aug 2006
Posts:
34
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Thank you for the reply but I did do that. I guess I will let it go maybe it takes time to start working but it's been more than a day. I'll give it another day and then uninstall it if it doesnt work. Im just curious why it isnt working. The information google provides looks interesting so I really wanted to use this.

19 May 2007, 5:56 PM
#157
dtb avatar

dtb

New Zenner

Join Date:
Apr 2005
Posts:
47
Plugin Contributions:
0

Re: Simple Google Analytics - Support

ugh, i want this to work, but it won't!

:(

19 May 2007, 6:52 PM
#158
dtb avatar

dtb

New Zenner

Join Date:
Apr 2005
Posts:
47
Plugin Contributions:
0

Re: Simple Google Analytics - Support

ok, so i started over.

went back, and began at step 1 in the readme...

i replaced my:

<body id="<?php echo $body_id; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

with the suggested:

<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

and still no dice..

as i posted before, i did try that change that dreamdaily suggested, but haven't tried it again, since my re-started attempt...

my catalog site is:

http://www.designertoybox.com/index.php

if anyone can help, i would be eternally grateful...

thank you..

bill

20 May 2007, 1:02 AM
#159
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

DTB:

ok, so i started over.

went back, and began at step 1 in the readme...

i replaced my:

<body id="<?php echo $body_id; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

with the suggested:

<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

and still no dice..

as i posted before, i did try that change that dreamdaily suggested, but haven't tried it again, since my re-started attempt...

my catalog site is:

http://www.designertoybox.com/index.php

if anyone can help, i would be eternally grateful...

thank you..

bill

What version of Zen are you running? If you can get me quick access (FTP) to the site, I can look at what is going on and try to get it installed for you. PM me the details if you are interested. It really shouldn't be this hard?

Also, do you have any other mods running on the site? Not that it would matter too much, but it is good to know. Just shoot me a private message if you want me to look at it further. I'd be happy to.

20 May 2007, 1:05 AM
#160
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

DTB:

ugh, i want this to work, but it won't!

:(

If you can't get it to work using the Mod. You may want to try the "manual install" method (the mod does not need to be installed).

I used Google Analytics on an older Zen 1.2.x version and it worked just fine. I installed analytics, conversion tracking, and e-commerce tracking manually (before the Simple Analytics mod was even available -- or I might have tried that route).

Anyhow, I listed out the manual steps and code to get it installed here for another user. It may help.

http://www.zen-cart.com/forum/showthread.php?t=43907