Adding Google Analytics to your Zen Cart store

来源:互联网 发布:新手淘宝开店教程视频 编辑:程序博客网 时间:2024/04/20 06:01
Google Analytics, a free web analytics tool, can provide you with a range of statistics on your website traffic and marketing effectiveness.  One of the more useful features of Google Analytics is the ability to flag certain pages as “goals.” This is specifically beneficial to e-commerce web sites such as your Zen Cart store where you may set the Checkout Success page as a goal so that this can be reported on in Google Analytics.

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

  1. First, sign up to Google Analytics with a Google account.  If required, you can follow the step-by-step guide toSigning Up for Google Analytics.
  2. Log in to your Google Analytics account at http://www.google.com/analytics.
  3. Click the Analytics Settings link.
    image
  4. 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).
  5. At the top right of the Main Website Profile Information box, click Check Status.
    image
  6. 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.
    image
  7. 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.

  1. 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.
  2. Using your FTP client, download this file to your computer.  Make another copy of the file and rename the copytpl_main_page_backup.php or something similar.
  3. Open the tpl_main_page.php file on your computer with your favourite editor, such as Notepad ++ or Dreamweaver.
  4. Scroll to the end of the file and locate the </body> tag.
  5. Paste the Google Analytics code directly above this tag.
    ?><!--eof- banner #6 display –>     <!--enter Google Analytics code here-></body>
  6. Save the file and upload to your Zen Cart store.
  7. Go back to the Google Analytics home page and click on Edit next to your Zen Cart store profile.
  8. Click on Check Status.image
  9. Under Tracking Status Information, you will now see that the tracking code has been successfully installed and that the status isWaiting for Data.
    image
  10. 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.

原创粉丝点击