如何使用Cookie跟踪重复访问者 [英] How can I track repeated visitors using cookies

查看:88
本文介绍了如何使用Cookie跟踪重复访问者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想跟踪我们网站的重复用户,以使用Cookie向其他用户显示。可以是java或javascript。

I want to track repeated user for our web site to show others by using cookies. It can be either java or javascript.

推荐答案

如果您想要一个非常简单的系统,则可以使用GUID-用户首次访问时输入值。然后,您将在每次请求时重新获得此Cookie。处理请求时,将要跟踪的信息以及cookie中的GUID记录在数据库中。

If you want a very simple system, you can write a cookie with a GUID-type value when the user first visits. Then you'll get this cookie back on every request. When you handle the request, log the info you want to track, along with the GUID from the cookie, in your data base.

根据需要切片和切块。

您会发现说起来容易,但是很难获得任何有意义的数据。

You'll find it's easy to say but hard to do and get any meaningful data.

这篇关于如何使用Cookie跟踪重复访问者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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