Re: Simple Google Analytics - Support
I've run into an odd problem implementing Simple Google Analytics. When I finished all the installation steps in the readme, I found that my shop main page was loading completely blank, only the black background is visible.
I tracked the problem down to the code in tpl_main_page.php. When I add the code:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
to my tpl_main_page.php, my main page goes blank. When I remove it, it works again.
Any ideas? I'm using the default tpl_main_page.php, as my template didn't have one. So this code is the only change from the Zen Cart default.
Thanks in advance!
HG
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Gertzy
Go find the html_header.php file in the default header common folder, and make a copy of it in your Cherry Zen common folder... then edit it there...
That causes a 500 error because it's not a standard file for the cherry zen template.
Has anyone successfully integrated the Simple Google Analytics mod while using the Cherry Zen template? If so, how did you do it with that html_header.php file not existing?
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
larkin1981
That causes a 500 error because it's not a standard file for the cherry zen template.
Has anyone successfully integrated the Simple Google Analytics mod while using the Cherry Zen template? If so, how did you do it with that html_header.php file not existing?
It doesn't matter whether it's a standard cherry-zen template file - files that aren't modified by default in the cherry-zen are taken from the template_default folder - it should not cause any problem whatsoever to copy the exact file over.
Are you sure you're dropping it into the right folder in your template?
Have you tried dropping it into the template folder without modifying it first?
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
HenryGale
I've run into an odd problem implementing Simple Google Analytics. When I finished all the installation steps in the readme, I found that my shop main page was loading completely blank, only the black background is visible.
I tracked the problem down to the code in tpl_main_page.php. When I add the code:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
to my tpl_main_page.php, my main page goes blank. When I remove it, it works again.
Any ideas? I'm using the default tpl_main_page.php, as my template didn't have one. So this code is the only change from the Zen Cart default.
Thanks in advance!
HG
A blank page means there is an error in your PHP code somewhere. Typically this happens when one inadvertently alters other code or places the php code listed in such a way where it mess with current code on the site.
To find out where your problem is make sure you have error checking turned on (default in 1.3.9 versions but if you don't have that you can download the error checking file "Debug Error logging").
To find out where the error is then, place your code back on the page and then try to access it. When you get the white page an error log will be written to your 'cache' folder (with the date / time ... this is how you tell which log goes with which action. If there are too many you can delete the error logs and repeat the above step so there is only one in there when needed.)
Open that error log and it will tell you the exact issue and line of code to look at. If you can;'t figure out what the error means, post it here and I'll walk you through it.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
larkin1981
That causes a 500 error because it's not a standard file for the cherry zen template.
Has anyone successfully integrated the Simple Google Analytics mod while using the Cherry Zen template? If so, how did you do it with that html_header.php file not existing?
This module works with all templates no matter where they come from or who built them.
If you get 500 error you did something wrong in moving the file.
Cherry zen actually does use the html_header.php file in the default folder (all template must for them to work) so by moving it you must have incorrectly placed it.
What you want to do is take the following file:
/includes/templates/template_default/common/html_header.php
copy that to the following location
/includes/templates/[insert your template name here]/common/html_header.php
After you have moved it there make your changes and upload.
If all has been done correctly, it should work just fine with no issues.
Re: Simple Google Analytics - Support
Hello there
can you help me please ,
all installed very well ( i think)
but i see : Tracking Not InstalledLast checked: Mar 26, 2011 12:30:39 PM PDT
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.
and i ask , why ?
www.king-magic.com
Re: Simple Google Analytics - Support
Looking at your site and viewing the source code it appears that you have 2 - 3 different snippets of Google Analytics installed on the pages. You should only have one.
Remove all those you don't need and only let the Module add it.
Once that is complete, go back and re-verify the tracking with Google.
That should do it.
1 Attachment(s)
Re: Simple Google Analytics - Support
Hello - has anyone had experience of this issue when doing a clean install
I am installing onto my test system prior to installing on the live version and I keep getting a sql syntax error when trying to install the SQL file
Quote:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
PRIMARY KEY (languages_id),
KEY idx_languages_name_zen ('name')
) TYPE=M' at line 5
I have looked at the MySQL reference but have to confess I got somewhat lost
I am using Zen Cart 1.3.9h
Database Patch Level 1.3.9h
PHP 5.3.5
Mysql 5.5.8
I have searched the thread and the forum and am perplexed that there doesnt seem to be others who have experienced the problem
Any help gratefully received
Thank you
Centec2b
Re: Simple Google Analytics - Support
i believe i have added everything correct. I receive no errors of any kind and even analytics says its receiving data. In fact, my traffic dropped to 0 so i know its not calculating my traffic. Also, when i view my source code on any page in the site, i cannot see any code relating to google analytics.
i am using the "iC_AcadameV1.2" template along with the latest version of Zen Cart.
i also had to copy the "html_header" into my iC_AcadameV1.2 template folder because it was not there.
Anyone got any ideas?
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Centec2b
Hello - has anyone had experience of this issue when doing a clean install
I am installing onto my test system prior to installing on the live version and I keep getting a sql syntax error when trying to install the SQL file
Hello reference my original post #1600. I am assuming the problem is within my setup on the test system, rather than a code error, due to the overwhelming number of successful users.
But it still seems odd that no one else has had a problem
To try and locate the problem I have updated to the latest version of xampp for win 32 1.7.4
Rewritten the code into a new sql file
Neither have any beneficial effect
I guess the next step is to try and cross reference against other SQL instructions
I have an odd feeling I am going to kick myself when the reason for the error becomes apparent!
Centec2b