Analyzing the data from your ecommerce website is extremely important in that you use it to make your business decisions to improve your bottom line. One of the tools that you can add to OpenCart for this purpose is Google Analytics. This application is a free program that provides a wealth of information that can help you understand your web traffic. However, one of the limitations for using Google Analytics in Opencart is the fact that it can only be used in a single store. If you are managing multiple stores, then you will need to setup the multi-store extension first. If you are seeking to setup the extension for only one store, go to Setting Up Google Analytics in OpenCart 1.5. The following article explains how to install and configure the MultiStore Google Analytics extension in OpenCart 1.5.
Installing the Multistore Google Analytics Extension in OpenCart 1.5
The Google Analytics plug-in that we will be using is the free Multistore Google Analytics version (1.10) that can be found on the OpenCart Extensions download area. Before you begin the installation of an OpenCart extension, please review this checklist:
- Check the version of the extension that you are using and make sure it matches with your OpenCart installation.
- Have Cpanel access to use the File Manager or FTP access to the account.
- Meet any pre-requisites that the extension may require. In this case, the extension requires vQmod in order to operate. You can find information for vQmod's installation by going to Setting Up vQmod for OpenCart 1.5.
- Make sure that you have obtained the ZIP file for the extension from the OpenCart site.
- If you haven't already established an account with Google, you will need to do so for Google Analytics in order to complete the process of setting up the extension (it won't operate without the account)
- Login to the Cpanel File Manager (see File Manager)
- Use the File Manager and go to your OpenCart installation directory. If you are using the primary domain for your installation, then the files will be directly in the PUBLIC_HTML folder. This is a vQmod extension and therefore, the installation files will eventually need to go into the XML folder for the extension. Please make sure to review the README.TXT file that is saved in the ZIP file for the extension file that you install - the README file contains the installation instructions for the extension. Upload the ZIP file for the Google Analytics Extension into the OPENCART installation folder.
- Click on the ZIP file to select it, then in the top right hand corner of the FILE MANAGER, click on EXTRACT. You should see something similar to the screenshot below:
The path that you can alter is at the bottom. You can extract the folder wherever you wish, but the key file that you will need to reach is vqmod_multi_google_analytics.xml. If you run the extract routine in a folder on your server, you will see the following file folder contents:
- Go into the XML folder and copy the vqmod_multi_google_analytics.xml file into the vQmod/xml folder installed within your OpenCart installation.
- The last step in setting up Google Analytics in OpenCart is to add the tracking code. First, you will need to login to the Administrator Dashboard as an Administrator.
- Hover over the menubar where it is labeled SYSTEM, then click on SETTINGS at the top of the drop-down menu when it appears.
- This extension made so that you could add multiple Google Analytic Tracking codes - one for each store. Select the store where you wish to add the code, then click on the SERVER tab. You will see the following:
- Once you have completed adding the code, make sure to click on SAVE in the top right hand corner in order to save your entry.
Completion of the Google Analytics installation allows you to track the web stats for this store. If you have multiple stores, the data is saved separately, but still visibly tracked in your Google Analytics account. For more information on using Google Analytics, please go to Google Analytics Home page.