如何衡量特定访问者在网站上花费的时间长度?
我知道存储有关用户的个人信息(即电子邮件地址、登录名)违反了 Google Analytics 服务条款。但我有一个要求,需要通过电子邮件地址跟踪用户在网站/页面上花费的时间。
以前有人这样做过吗?
I know it is against Google Analytics terms of service to store personal information about a user i.e. email address, log in name. But I have a requirement that need to track time spent on site/page for a user by email address.
Has anyone done this before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些术语比这更具体一些(如果不是,谷歌分析将根本无法在用户登录的网站上使用),但问题是为什么您需要通过电子邮件地址跟踪它们。只要您的用户登录,您所要做的就是在他们登录时设置一个会话 ID,然后在该会话 ID 用于内容请求时跟踪该会话 ID。对于 PHP 后端,这在 http://www.php.net/manual/ 中进行了描述en/intro.session.php 但其他服务器端语言也有类似的功能。
The terms are a bit more specific than that (if they weren't, google-analytics would not be usable on sites with user logins at all), but the question is why you need to track them by email address. As long as your user is logged in, all you have to do is set a session ID when they log in, and then track that session ID when it's being used for content requests. For PHP backends this is described in http://www.php.net/manual/en/intro.session.php but other server-side languages have similar functionality.