Adding Google Analytics to your Zen Cart store

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 to Signing 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 copy tpl_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 is Waiting 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值