Installation Instructions (New Installs ONLY and upgrade from oldest 1.0 version)
-----------------------------------------------------------------------------------
NOTE 1: Follow these set of instructions ONLY if you have never had any of the Simple Google Analytics Modules installed.
If you have had any other version (1.0 or 1.1) prior to this, then follow the upgrade instructions for your version.
NOTE 2: Where ever you see the words "your_template" (in either these instructions, or the file folders included with the install)
you should REPLACE that with the directory name that yoru template is running from. So for example, if you are running a
custom template and the directory that you decided to keep those template files in is called "mycustomtemplate" then, where ever
you see the words "your_template", you would change it to "mycustomtemplate".
If you are using the default template provided with zen cart, then you would replace each instance of "your_template" with the
following: "template_default"
HINT: If you don't know what the directory name is you are using, then you can find it out by following these steps:
1) Login to your Zen Cart admin
2) Go to "Tools > Template Selection" from the menu
3) From the screen that shows, look under the column that is titled "Template Directory". The name you find under that column is the
name of the directory that your zen cart site design is running in. This EXACT name is the one that you will use to replace
each instance of "your_template".
1. After you have identified the directory that your template is running from and determined where you will be uploading the files to,
upload the included install files and directories to your zen cart site.
2. Make sure your body tag in /includes/templates/[your_template]/common/tpl_main_page.php
includes this code (if not see trouble shooting below it is not neccassary but an addition
to your template needs to be made):
**** HELPFUL HINT: ****
If you are runnning any of the 1.3.x versions of Zen Cart, this line is already
included with those installs and you can safely skip this step. You may need to check earlier
versions for it though.
***********************
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
3. At the bottom of /includes/templates/[your_template]/common/tpl_main_page.php
Copy and paste the following lines of code (found below) just before the </body> tag:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
4. If this is a BRAND NEW install, you will need to update your database with the googleanalytics.sql file.
If you are upgrading (from the oldest 1.0 version), you will need to use the SQL file that is called googleanalytics-UPGRADE.sql
In your site admin go to Tools->Install Sql Patches and apply the googleanalytics.sql patch included.
NOTE to those upgrading from version 1.1
========================================
If you are upgrading from the previous 1.1 version, then follow the upgrade instructions included for that version located
in the abvoe section. Do not use these instructions.
NOTE to those upgrading from version 1.0
========================================
The new "ga.js" version of tracking does not need one bit of JavaScript that was included in the previous "urchin.js"
versions. You will need to DELETE this line from your code.
includes/modules/pages/checkout_success/on_load_main.js
REMOVE the following line from that file "javascript
:__utmSetTrans();"
If that is the ONLY line you see in the file, than it is safe to completely DELETE the file. If this is not the only
line found in that file, then delete only that line, and save the file. Re-upload the new version to your site.
Keeping this line in when using the new ga.js tracking code can causee JavaScript errors to pop up on your site (since
the new code does not refer to this function anymore).
------------------------------------------------------
How to use this module
------------------------------------------------------
1. Once you have completed a successful install or upgrade, login to your Zen Cart admin and go to configuration->google analytics configuration and set your google
analytics account number and any of the other settings as you see fit.
2. Login to your Google Analytics account and make sure your site is set to "receiving data"
or "waiting for data" (this means you have sucessfully installed the analytics code on your
site.)
3. To take advantage of Google Analytics E-Commerce Tracking, you must login to your Google
Analytics account after installing this contribution and enable e-commerce reporting as follows:
a. Log in to your account.
b. Click "Edit" next to the profile you'd like to enable.
c. On the Profile Settings page, click "edit" next to Main Website Profile Information.
d. Change the E-Commerce Website radio button from No to Yes.
e. Save your changes
Bookmarks