Re: Simple Google Analytics - Support
juneloveelyn,
If you installed a "template" to replace the default Zen Cart, the "my_template" should be replaced with that template's name, i.e., includes/templates/apple_zen/common/tpl_main_page.php.
When you installed the Simple Google Analytics module, there was a "my_template" that was to be renamed with the template you are using. If you are using the default and have not installed a template, I believe there is a routine to follow where you duplicate all of the template_default directories in your cart and name them "classic" so you can use the overrides system. I'm sure this is explained somewhere--in a tutorial, possibly. Of course, then you would go to Admin>Configuration>templates (I think) and choose the classic template (which is a duplicate of the default template, of course).
If you are using the default "classic" Zen Cart template, then place the code in includes/templates/template_default/common/tpl_main_page.php.
You are witnessing the overrides system in action (or inaction). When you install a template, usually the index page is governed by the tpl_main_page.php. That file is derived from the template_default/tpl_main_page.php, and then saved in the new template directory. You then have a copy of the default Zen Cart template for later use, plus a copy of the modified "override" template, which is the one Zen Cart will use.
It will work if you just save it under the template_default, but if you use the method above to use a "classic" duplicate of the default, then you will have an override system. Then, in includes/templates/classic/common/tpl_main_page.php, copy the modified file tpl_main_page.php into that file, and that would be the override. That would preserve changes as overrides, thereby making future upgrades easier because you could identify your changed files more easily and upgrade any of those changed files that might be involved in the upgrade, if any.
Sorry to be so wordy. It's just a great opportunity to consider the override system in a non-abstract way.
Re: Simple Google Analytics - Support
Still trying to sort out my issue of the following code appearing at the top of the header at www.gokaraokemachine.com:
Quote:
/* Begin Simple Google Analytics */ /* End Simple Google Analytics */
I am starting to wonder if this is really correct HTML code? Are there not supposed to be double slashes for comments such as these? Is this a new type of HTML or a PHP convention? Asking these questions here gives me a direction to research next.
I simply copied the code into my html_header.php before the </head>. One thing I tried was a line of space before and after the inserted code. Of course, my site went blank.
Another potential avenue might be some sort of connection to the new axynchronous tracking type that this code is supposed to enable. Maybe there is some setting I need to make to cause this unwanted verbiage/code to disappear from my home page header. I need to go to the Google Analytics site and try to set this up more effectively.
I will post if I make any discoveries in these avenues of research.
Re: Simple Google Analytics - Support
Maybe I should uninstall and reinstall.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Hi. Searching this thread, so far I do not see a reference to text appearing on the home page from the includes/templates/my_template/common/html_header.php.
My home page at
www.gokaraokemachine.com shows the following text at the very top:
I saw that there was an HTML-related problem in 1.3.9g that was fixed in 1.3.9h. I'm not actually sure this is HTML appearing. I had just gone live when I upgraded to 1.3.9h from 1.3.9g and noticed this problem which I had not noticed before. I just recently upgraded from Simple Google Analytics version 1.2.2 to 1.2.3. My ISP just implemented PHP 5.3.2-1ubuntu4.5.
Any tips would be appreciated. I apologize if this has been discussed somewhere in this thread--I just couldn't find the right search term.
This should not be showing on the page at all. I've got this installed on a number of sites and that does not show up. It is PHP commented code that for some reason is rendering on your site. I would suggest you go back and try to reinstall. My guess is that during install, some of the items that were copied to their place were altered to show this text. It should not be on the page.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
tally622
Good Friday morning all. I've been asked to do some SEO work on a Zen Cart (which I've never used) site so I've been doing research here and in manuals for the last 2 days. I'm getting ready to install Simple SEO and Simple Google Analytics and just wanted to see if there were any issues I should anticipate. I'm going through the last 50 pages of the support forum for Simple SEO and then I'll do the same for Simple Google. The only variable I may intoduce is that after I get these 2 set up I intend to create a custom opening page that I've already created in PhotoShop in HTML. It's just easier for me right now until I get more familiar with Zen Cart. I hope this isn't going to break anything.
Also, when I was forced to do a Drupal site 2 years ago they had an (buggy) Admin module that allowed me to select any element on the page and it would show the template heirarchy which made it very easy for a newbie. Is there anything comparable to this in Zen Cart?
Oh, I've already installed Module Manager if that makes a difference.
Thanks
Installing these two mods will not cause a problem. They both work just fine together. Neither uses the module manager contribution, and in fact, not many modules use that at the moment.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
notageek
Still trying to sort out my issue of the following code appearing at the top of the header at
www.gokaraokemachine.com:
I am starting to wonder if this is really correct HTML code? Are there not supposed to be double slashes for comments such as these? Is this a new type of HTML or a PHP convention? Asking these questions here gives me a direction to research next.
Nope. Just a result of human error. Read below for your answer. :)
Quote:
Originally Posted by
notageek
I will post if I make any discoveries in these avenues of research.
I'll save you some time here. The answer is as follows:
I went to your site and see what you did wrong.
You copied the text from the readme file and included the comments I had in the readme (that were not supposed to be included on the page but were only for illustration in the readme.)
You're only supposed to copy the PHP lines of code (as per the instructions).
So when you copied the information you also copied the commented text directly from the text file. When you do this with any text, and add it to a file that will be put to the internet, it will render as text on the page (as is in your case).
To remove it, just remove the lines of code that you didn't need in the first place and only include the PHP portions. That will remove it from your site.
Re: Simple Google Analytics - Support
Eric,
Thank you for your indispensable help and especially for your very clear explanations. Thanks also for this module.
I browsed to www.ZencartOptimization.com referenced in the module as providing tips on using Google Analytics. I'm frankly in awe of the talented writing on that site, and how engaging, well-organized, and enlightening the articles are. The articles really clarify what is happening in an online store and how analytics may be used to increase sales.
Your enthusiasm for well-used analytics seems to permeate the site, and is "catching."
Notageek
Re: Simple Google Analytics - Support
I just realized that I forgot to place the google_analytics.php file in my template directory.
I ran the install successfully on a test server and it went well so I guess I got sloppy
After realizing my error I copied the google_analytics.php file to the correct spot in my template folder but the GA code is still not appearing in the source of my pages.
Do I have to run the SQL command again now that the google_analytics.php file is in the correct place? If I do run it again will it cause any issues?
I am running zencart 1.3.7.1 and this is a fresh install of Simple GA 1.2.3.
Thanks in advance for your help.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
csimmons83
I just realized that I forgot to place the google_analytics.php file in my template directory.
I ran the install successfully on a test server and it went well so I guess I got sloppy
After realizing my error I copied the google_analytics.php file to the correct spot in my template folder but the GA code is still not appearing in the source of my pages.
Do I have to run the SQL command again now that the google_analytics.php file is in the correct place? If I do run it again will it cause any issues?
I am running zencart 1.3.7.1 and this is a fresh install of Simple GA 1.2.3.
Thanks in advance for your help.
No, you do not have to rerun the SQL patch.
If you don't see the tracking code still, then make sure you put the google_analytics.php file in the correct location.
If you are running a custom template then that directory goes in the 'custom template folder' (NOT the default folder.)
So if your template is called 'mycustomtemplate' then the directory would go into the following location:
/includes/templates/mycustomtemplate/google_analytics (this is the directory you uploaded.)
If you have no tracking code showing on your page at all, this is the reason it won't show (the code is likely uploaded to the wrong location.)
Re: Simple Google Analytics - Support
Hi Eric! Hope you are doing great...quick question..I just installed this mod and I can see the code during the checkout process and everything is set properly as far as I can tell in my Analytics account...but it is not capturing the sales?!?! I have read back a few pages and did not find anything that has helped so I figured I would check to see if you can see anything wrong?!?
The site is http://outdoorplaytoys.com
....and as always...thanks.....