用于跟踪网页浏览量(或唯一访问者)的最佳 Grails 实现?
我需要实现一个非常流行的功能:显示个人资料页面的浏览次数。
例如,StackOverflow 中的我的个人资料页面将显示有多少人查看过我的个人资料(就在我的声誉分数下方)。
我认为该算法基于一些 cookie 和/或访问者 IP 地址。有没有一种简单的方法(插件或一些代码源)可以在 tomcat/apache 上运行的 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 Clickstream 插件:http://grails.org/plugin/clickstream
我没有使用过它直接,但它基于我在 Grails 之外使用过的库。我们考虑在一个项目中使用该插件,我审查了实现,它看起来很可靠,但我最终离开了该项目。
这并不直接解决您的请求,但您可以查询它创建的表,或者借用它用于执行跟踪各个页面的专门实现的逻辑。
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.
你为什么不使用谷歌分析?
Why don't you use Google Analytics?