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?
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?
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)
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.
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.
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.
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.
Hmm...will check it out. Thanks for your help DrByte.
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.
Bookmarks