Let me say this to you. Since version 1.2.5 the html_header.php is no longer needed. The code for Simple Google Analytics in that file can be deleted. Here is the upgrade instruction to get it to work for your site. Yes the change in code is needed.
************************************************************
************************************************************
************************************************************
Author: Eric Leuenberger (Zen ID: econcepts)
http://www.ecommerceamplifier.com
Contribution Name: Simple Google Analytics
Version Date: v 1.2.5c 04/13/2012
Updated By: CountryCharm
License: under the GPL - See attached License for info.
************************************************************
Designed for: Zen Cart v1.5.0.
************************************************************
-------------------------------------------------------------------------
UPGRADING FROM PREVIOUS VERSIONS OF SIMPLE GOOGLE ANALYTICS:
--------------------------------------------------------------------------
!!!BACKUP!!! ALWAYS MAKE SURE YOU HAVE AN UP TO DATE BACKUP OF YOUR FILES and MySQL DATABASE BEFORE INSTALLING
You should test this on TEST SITE before going live!!!!!!!
--------------------------------------------------------------------------
Upgrading Simple Google Analytics from 1.3x compatible version to v1.5.0 ready version.
1. Unzip the contribution.
2. Open the zen_1.5.0 and then the upgrade folder.
3. Change the admin folder name to match the name of your custom directory and ftp to your sever.
4. Run the included 1-5-0_upgrade.sql using the Zen-Cart Sql Patches tool (admin -> tools -> install sql patches)
For best results, copy-and-paste the code into the query field and press 'Send'.
Delete the files in admin/includes/boxes/extra_boxes/ (these files are now obsolete and should be deleted in their entirety!!)
5. NOTE: If you were using a previous version (1.2.x) of Google Analytics (prior to 1.2.3) then you'll need to change the code in the previous locations
At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Find the lines of code that look like this (found below) just before the </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
CHANGE / replace the lines of code to look like this:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
6.) In Version 1.2.5 a new override file is being used so there are a few lines of code you need to remove from a file (altered in previous versions) on your site.
This override file prevents the need for altering the
'html_header.php" file (as in some earlier versions.)
After uploading all files to the server do the following:
6a) Open the file found at: /includes/templates/[your_template]/common/html_header.php
6b) Find the lines that look like this just before the </head> tag and REMOVE them (delete). Save the file and re-upload to your server.
PHP Code:
<?php
/* Begin Simple Google Analytics */
if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator')) ) {
//Skip outputting the tracking code as this is a pop-up window
} else { // Print tracking code to page
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
} // end if for page determination
/* End Simple Google Analytics */
?>
--------------------------------------------------------------------------
Bookmarks