更新 Drupal 的统计模块

为了能看到每篇文章或者日志有多少人人看过,需要开启 Drupal 的“统计”(Statistic)模块。以前用过一次,后来发现有几个问题:搜索引擎的搜索记录也算进去了,还有一个就是我自己的点击也算了进去,这样看起来节点的点击量都很多,实际上绝大部分都是搜索引擎带来的,看着也不爽。后来就关掉了。前两天又找了一下,找到了一个模块 [Statistics Advanced Settings],发现是完全符合我的需求,然后就装上试用。

这个模块提供的功能有三个:

  • 不会重复计数。对同一个 Session ID 的匿名用户或者同一个用户只计算一次。
  • 丢弃特定角色(Role)的用户的访问记录,比如管理员和作者自己。可以通过 “Administer => Reports => Access log settings” 来设定。
  • 丢弃爬虫和机器人的访问记录。这个功能需要和 [Browscap 模块]一起来使用。当 Browscap 安装设置好以后就直接可以看到效果了。具体请看下文。

其配置基本上比较简单,也就不详细说了。

下面说说 Browscap,这个模块利用 [Browser Capabilities Project] 底层的[数据],从而将链接到 Drupal 的客户端的浏览器进行确定并分类,比如是 Mozilla、FireFox、Opera 以及其具体版本,是不是爬虫或者机器人等。

安装完成之后,进入“Administer => Site configuration => Browscap”,第一次要点击“Refresh now”去上述的网站拿到数据,然后选定“Monitor browsers”,接下来就等着别人访问吧。一段时间之后,可以在“Administer => Reports => Browscap”查看报告,列出了一些浏览器类型、是否爬虫等等信息。

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.