---
title: "AWStats的自定义扩展统计：Using the Extra Sections features"
author: "txf2004"
date: "2009-12-23T00:33:00Z"
tags: []
slug: "awstats-using-the-extra-sections-features"
draft: false
lastmod: "2009-12-23T00:33:00Z"
id: 952393
url: "https://txf2004.iteye.com/blog/952393"
---

如何利用AWStats针对网站自身应用进行特定参数的统计，今天学习了一下：[AWStats Documentation - Using the Extra Sections features](http://awstats.sourceforge.net/docs/awstats_extra.html#level2dir "AWStats Documentation - Using the Extra Sections features")。文档中主要有以下几个例子：  
\# Example 1: Tracking Product orders  
跟踪商品订单：解析出GET /cgi-bin/order.cgi?productid=49&session=A0B1C2 中的productid=字段  
\# Example 2: Tracking Bugzilla most frequently viewed bugs  
跟踪bugzilla中最经常被访问的Bug：原理同上，这在内部开发中非常有用，类似的，也很容易给BBS系统配置出最常访问的论坛等统计。  
\# Example 3: Tracking Exit clicks  
跟踪用户离开当前网站的点击：前提是你将所有指向其他网站的链接通过/cgi-bin/awredir.pl?url=http://externalsite/pagelinked这样的链接进行部署。  
\# Example 4: Tracking aborted download  
跟踪中断的下载：利用的是HTTP返回的状态码206 ExtraSectionCodeFilter1="206"  
\# Example 5: Tracking most requested domain aliases  
跟踪最常用的域名别名：这需要在日志中部署并定义扩展字段%your\_extra\_field，然后在ExtraSestion中部署统计相应的扩展字段%your\_extra\_field 这里的例子就是将域名的别名，在一个域名有多个别名的时候，分析那个域名最常用最有帮助。  
\# Example 6: List of top level 2 path under a directory /mydir  
跟踪某个目录下最常访问的2级子目录，根据样例设置了一个 [/tech](http://www.chedong.com/cgi-bin/awstats/awstats.pl?config=chedong&framename=mainright#extra2) [/blog](http://www.chedong.com/cgi-bin/awstats/awstats.pl?config=chedong&framename=mainright#extra1) 2个目录下的TOP文章统计。