问题描述
我需要实现一个非常受欢迎的功能:显示个人资料页面的浏览量。 例如,在StackOverflow中将显示有多少人查看过我的个人资料(仅限于我的信誉评分)。
我想这个算法是基于一些cookie和/或访问者IP地址。有没有一种简单的方法(一个插件或一些代码源)在Tomcat / apache上运行的Grails中实现它? nofollow> http://grails.org/plugin/clickstream
我没有直接使用它,而是基于一个库,已经在Grails之外使用过。我们考虑将该插件用于某个项目,并审查了实施情况,结果看起来很稳固,但我最终离开了该项目。
这并不直接满足您的要求,但您可以查询它创建的表格,或借用其用于执行跟踪各个页面的专门实施的逻辑。
I need to implement a very popular feature : displaying the number of views for a profile page.
For instance, my profile page in StackOverflow will display how many persons have viewed my profile (just under my reputation score).
I suppose that the algorithm is based on some cookies and/or visitor IP addresses. Is there a simple way (a plugin or some code source) to implement it in Grails running on tomcat/apache?
Check out the Clickstream plugin: http://grails.org/plugin/clickstream
I haven't used it directly but it's based on a library that I've used outside of Grails. We considered using the plugin for a project and I reviewed the implementation and it looked solid, but I ended up leaving the project.
This doesn't directly address your request but you could query the table that it creates, or borrow the logic that it uses to do a specialized implementation for tracking individual pages.
这篇关于用于追踪网页浏览量(或独特访问者)的最佳Grails实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!