AWStats的自定义扩展统计:Using the Extra Sections features
如何利用AWStats针对网站自身应用进行特定参数的统计,今天学习了一下: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 /blog 2个目录下的TOP文章统计。
增加的配置如下
ExtraSectionName1=”Top aticles under /tech”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”URL,^/tech/.*”
ExtraSectionFirstColumnTitle1=”Article Name”
ExtraSectionFirstColumnValues1=”URL,^/tech/([w]+).html”
ExtraSectionFirstColumnFormat1=”<a href=’/tech/%s.html’ target=’new’>%s</a>”
ExtraSectionStatTypes1=PHL
MaxNbOfExtra2=20
MinHitExtra2=1
样例输出:
|
Article Name |
网页数 |
文件数 |
最近参观日期 |
|
awstats |
80 |
80 |
2005年 十一月 27日 13:20 |
|
|
49 |
49 |
2005年 十一月 27日 13:13 |
|
google_url |
42 |
42 |
2005年 十一月 27日 13:12 |
|
cvs_card |
36 |
36 |
2005年 十一月 27日 13:24 |
|
lucene |
30 |
30 |
2005年 十一月 27日 13:22 |
|
cms |
26 |
26 |
2005年 十一月 27日 13:11 |
|
link_pop_check |
25 |
25 |
2005年 十一月 27日 13:13 |
|
apache_install |
24 |
24 |
2005年 十一月 27日 13:13 |
|
google_ads |
21 |
21 |
2005年 十一月 27日 13:16 |
|
weblucene |
18 |
18 |
2005年 十一月 27日 13:13 |
|
indent_tools |
18 |
18 |
2005年 十一月 27日 12:57 |
|
cache |
17 |
17 |
2005年 十一月 27日 13:17 |
|
hello_unicode |
14 |
14 |
2005年 十一月 27日 13:18 |
|
study |
12 |
12 |
2005年 十一月 27日 13:29 |
|
resin |
11 |
11 |
2005年 十一月 27日 13:20 |
|
rotate_merge_log |
11 |
11 |
2005年 十一月 27日 12:02 |
|
mysql |
11 |
11 |
2005年 十一月 27日 13:02 |
|
ant |
9 |
9 |
2005年 十一月 27日 12:40 |
|
xslt |
8 |
8 |
2005年 十一月 27日 12:55 |
|
weblog |
8 |
8 |
2005年 十一月 27日 12:34 |
ExtraSectionName2=”Top aticles under /blog/archives/”
ExtraSectionCodeFilter2=”200 304″
ExtraSectionCondition2=”URL,^/blog/archives/.*”
ExtraSectionFirstColumnTitle2=”Article Name”
ExtraSectionFirstColumnValues2=”URL,^/blog/archives/([d]+).html”
ExtraSectionFirstColumnFormat2=”<a href=’/blog/archives/%s.html’ target=’new’>%s</a>”
ExtraSectionStatTypes2=PHL
MaxNbOfExtra2=20
MinHitExtra2=1
|
Article ID |
网页数 |
文件数 |
最近参观日期 |
|
000432 |
43 |
43 |
2005年 十一月 27日 13:14 |
|
000741 |
39 |
39 |
2005年 十一月 27日 13:23 |
|
001065 |
38 |
38 |
2005年 十一月 27日 13:28 |
|
001070 |
38 |
38 |
2005年 十一月 27日 13:27 |
|
001071 |
38 |
38 |
2005年 十一月 27日 13:26 |
|
001058 |
31 |
31 |
2005年 十一月 27日 12:58 |
|
000825 |
19 |
19 |
2005年 十一月 27日 13:28 |
|
000728 |
16 |
16 |
2005年 十一月 27日 13:17 |
|
000772 |
15 |
15 |
2005年 十一月 27日 12:33 |
|
000515 |
15 |
15 |
2005年 十一月 27日 13:26 |
|
000638 |
15 |
15 |
2005年 十一月 27日 13:25 |
|
000950 |
14 |
14 |
2005年 十一月 27日 13:09 |
|
001060 |
13 |
13 |
2005年 十一月 27日 12:52 |
|
000878 |
13 |
13 |
2005年 十一月 27日 12:45 |
|
000655 |
11 |
11 |
2005年 十一月 27日 12:24 |
|
000790 |
11 |
11 |
2005年 十一月 27日 13:26 |
|
000945 |
11 |
11 |
2005年 十一月 27日 13:29 |
|
000661 |
11 |
11 |
2005年 十一月 27日 11:55 |
|
000651 |
11 |
11 |
2005年 十一月 27日 09:57 |
|
000646 |
11 |
11 |
2005年 十一月 27日 13:24 |
改进建议: 发现了一个样例,解决了。
目前的扩展输出能够统计出ID,但是要点击回原有的链接还是很麻烦,希望AWStats能提供相应的模板,让统计出来的ID能还原回URL,以方便点击反查。当然AWStats本身也提供了CSV/XML等格式的输出,可以自己做一些统计扩展来实现这些功能。
# 注释:统计列说明,在ExtraSectionStatTypes中只有PHBL这几个字段有效
# U = Unique visitors
# V = Visits
# P = Number of pages
# H = Number of hits (or mails)
# B = Bandwith (or total mail size for mail logs)
# L = Last access date
# E = Entry pages
# X = Exit pages
# C = Web compression (mod_gzip,mod_deflate)
AWStats统计工具安装和配置:
http://chedong.com/tech/awstats.html
和MT/WP这些发布系统一样,AWStats也是非常适合中小网站的统计系统。虽然速度和效率上不如WebAlizer/Analog (AWStats在统计百万级访问量的网站时已经很吃力了),但是AWStats所提供的功能却是WebAlizer/Analog远远不及的。所以遇到 效率问题的时候,解决的方法不一定是如何找到效率更高的千万级的网站统计系统,将网站分解成多个子频道也是一个可行的办法。
还没有评论