Forums / All Other Contributions/Addons / Why is a module needed for google analytics?

Why is a module needed for google analytics?

Locked

Started by barfoomoo on 6 Sep 2010, 12:19 PM · Views: 1,415

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
6 Sep 2010, 12:19 PM
#1
barfoomoo avatar

barfoomoo

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Why is a module needed for google analytics?

I am trying to integrate google analytics into my zen cart e shop and I saw a couple of articles pointing towards a module to do this. Why do I need a module to do this? Will not pasting the analytics code into templates/common/html_header.php work?

6 Sep 2010, 2:42 PM
#2
evelt avatar

evelt

Zen Follower

Join Date:
Nov 2009
Location:
In beautyful New York
Posts:
170
Plugin Contributions:
1

Re: Why is a module needed for google analytics?

Of course it will!

I would rather insert it at the tpl_main_page.php
before the ending body tag. I found that it's more VALID (xhtml, html, html5) and a lot faster
(if you cant get it validated, you're doing something wrong)

6 Sep 2010, 2:59 PM
#3
barfoomoo avatar

barfoomoo

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Re: Why is a module needed for google analytics?

eVelt, thanks for that. Was just curious to know whether the modules provide some additional benefits that I did not know of.

Regarding adding it before the end of body tag, there is a small possibility that you might loose some analytics if the user clicks on the page too soon(before it loads completely) and lands up in another page.

6 Sep 2010, 6:25 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Why is a module needed for google analytics?

Using an addon potentially lets you implement it without having to touch any existing files. Thus making upgrades easier later.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Sep 2010, 5:31 AM
#5
barfoomoo avatar

barfoomoo

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Re: Why is a module needed for google analytics?

Thanks for the reply DrByte. The add on seemed to be a bit heavy with SQL patch and all. So, was just pondering if it did something more than just analytics.

7 Sep 2010, 5:42 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Why is a module needed for google analytics?

If I remember correctly, it does those extra things in an effort to let you enter your GA account number via your Admin control panel, instead of having to edit any PHP files to store it someplace. It likely does some other things too.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Sep 2010, 5:54 AM
#7
barfoomoo avatar

barfoomoo

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Re: Why is a module needed for google analytics?

Hmm...will check it out. Thanks for your help DrByte.

8 Sep 2010, 4:49 PM
#8
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: Why is a module needed for google analytics?

Hi,

If you just want to use Google Analytics tracking without doing any ecommerce tracking then it is easy to set up in Zen Cart without using an add-on. I've written some instructions for doing that...
zen-unlocked.com/2010/07/setting-up-google-analytics-with-zen-cart/

Regards,
Christian.

23 Sep 2010, 7:23 AM
#9
niko62 avatar

niko62

New Zenner

Join Date:
Jul 2010
Posts:
24
Plugin Contributions:
0

Re: Why is a module needed for google analytics?

CJPinder, just follow your instructions, but there is no file called jscript in my template folder, I put it in template_default/jscript, where there is only one file "readme", is-it ok ?

Thanks for your help,
Nicolas.

23 Sep 2010, 7:53 PM
#10
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: Why is a module needed for google analytics?

Hi,

niko62:

CJPinder, just follow your instructions, but there is no file called jscript in my template folder, I put it in template_default/jscript, where there is only one file "readme", is-it ok ?
It is best not to place custom files in your template_default directory. Just create a folder called jscript in your template directory and then put the file in there.

Regards,
Christian.