在Plone中计算页面浏览量的最佳方法 [英] Best way to count page view in Plone

查看:110
本文介绍了在Plone中计算页面浏览量的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个需要对页面浏览量进行复杂使用的案例.

I'm working in a case require fairy complex use of page views.

每个内容对象都具有页面视图,应该易于访问它,以便我们可以执行与它相关的各种操作(按目录结果排序,显示,计算流行度...).最接近的等价于youtube视频的视图.

Each content object will have page view, and this should be accessed easily so that we can do various things related to it (sorted on catalog result, display, calculate popular metter ...). The closest equivalent is the youtube video's view.

我正在考虑一些实现此目的的方法:

I'm thinking of some possible ways to implemented this:

  1. 使用注释存储&索引器以创建portal_catalog索引&元数据.

  1. Use annotation storage & indexer to create portal_catalog index & metadata.

仅使用索引器(使用volatile属性或基于前一个索引更新索引),这样我们就不必两次写入频繁更改的数据.页面视图仅存储在对象的大脑中.

Use indexer only (either use volatile attribute or update index base on the previous index) so that we don't have to write a frequently changed data twice. Page view is only store in object brain.

使用关系数据库.然后我们如何使其与portal_catalog一起使用?

Use a relational database. Then how can we make it work with portal_catalog ?

在Plone之前使用包装层进行分析并通过某些API获取所需的数据.这缺乏灵活性,但有助于减少Plone方面的大量工作(写事件订阅者,检查会话,Cookie ...),并且性能应该更好吗?

Use a wrapper layer before Plone to do analytics and get desired data through some API. This scarify flexibility but helps reduce much work on Plone side (write event subscriber, check session, cookie ...), and the performance should be better ?

您对此有何想法?

推荐答案

我们已经为客户端项目(大型私有Intranet)使用了外部日志分析器.建筑:

We have used an external log analyser for a client project (a large private intranet). Architecture:

  • js库添加了一个"web bug",这是一个带有专用查询参数的空gif,是从专用的nginx服务器加载的.
  • 日志处理器会拾取nginx日志,对其进行轮换,然后将这些行解析为数据库,并计算访问次数和其他元数据. db中的条目包括内容的UID,以及其他有趣的角度.
  • 该站点对同一数据库具有只读访问权限,以进行统计信息查询.

页面计数很容易,只需在数据库中查询正确的UID.排名列表并不难.查询统计信息,然后使用UID将目录数据附加到结果集.

Page counts are then easy, just query the database for the right UID. Ranked lists are not much harder; query the statistics, then use the UIDs to attach catalog data to the result set.

我们现在面临的最大问题是缺乏数据仓库专业知识(将数据库中的各个访问行转换为有效的聚合),并且我们正在寻求对该工具进行重新配置以使用

The biggest problem we face now is a lack of data warehousing know-how (turning individual access rows in the database into efficient aggregates), and we are looking into retooling this setup to use Piwik as the statistics engine instead.

在这种特殊情况下,我们无法使用Google Analytics(分析),但是如果您没有这样的限制,我当然会建议您研究

We cannot use Google Analytics in this particular case, but if you do not have such a restriction, I'd certainly would advise you to look into collective.googleanalytics and see if you can make it fit your use case.

这篇关于在Plone中计算页面浏览量的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆