Information such as number of visitors, the pages they viewed, if they were a repeat visitor, their geographic location, their browser version and more is available through the easy to read reports and graphs.
Google Analytics only tracks pages that contain the Google Analytics tracking code. There are contributions / addons available to help you add the Google Analytics code to your Zen Cart store. However, it is a fairly simple process to do this yourself and to help you here is a step-by-step guide:
Locate the Google Analytics Tracking Code
- First, sign up to Google Analytics with a Google account. If required, you can follow the step-by-step guide to Signing Up for Google Analytics.
- Log in to your Google Analytics account at http://www.google.com/analytics.
- Click the Analytics Settings link.
- Click on Edit from your Zen Cart store profile’s Settings column. Please note that tracking code is profile-specific (if you have more than one site under your Google Analytics account).
- At the top right of the Main Website Profile Information box, click Check Status.
- Your tracking code is displayed in the box under Paste this code on your site, as shown. Click inside the box and press Ctrl-A to highlight the code. Press Ctrl-C to copy the code.
- Click Save and Finish.
Installing the Google Analytics Code
The Google Analytics code needs to be added to all pages that you wish to track. The best way to achieve this easily is to add the code to the main page template. This way the code is automatically included in each page as it is built by Zen Cart.
- Locate your template’s tpl_main_page.php file.
This will be located in the /includes/templates/custom/common folder, where custom represents your template’s folder name. - Using your FTP client, download this file to your computer. Make another copy of the file and rename the copy tpl_main_page_backup.php or something similar.
- Open the tpl_main_page.php file on your computer with your favourite editor, such as Notepad ++ or Dreamweaver.
- Scroll to the end of the file and locate the </body> tag.
- Paste the Google Analytics code directly above this tag.
?> <!--eof- banner #6 display –> <!--enter Google Analytics code here-> </body>
- Save the file and upload to your Zen Cart store.
- Go back to the Google Analytics home page and click on Edit next to your Zen Cart store profile.
- Click on Check Status.
- Under Tracking Status Information, you will now see that the tracking code has been successfully installed and that the status is Waiting for Data.
- Now, it’s a matter of waiting for Google Analytics to display the data it is collecting. This can sometimes take up to 48 hours.
Google Analytics can provide you with very valuable information about how your visitors interact with your Zen Cart store. Remember though, it is not real-time data and is only updated at various intervals throughout the day.