用户日志记录:应保留哪些数据?

发布于 2024-08-08 02:28:57 字数 91 浏览 6 评论 0原文

背景:工作用户登录的用户问答网站等。应保留哪些用户/访客数据?

  • IP地址
  • 日期/时间

Background: working a user q&a site where users logged,etc. What user/visitor data should be retained?

  • ip address
  • date/time
  • etc

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

星軌x 2024-08-15 02:28:57

我同意 @Franci 的回复。收集数据是为了回答你也需要答案的问题,而不是收集数据来提出你恰好能够回答的问题。

一般来说,有时值得记录以下信息:

  • IP(用于可能的阻止、确定国家/地区人口统计数据、跟踪使用模式)
  • 日期时间(用于跟踪使用模式)
  • 用户代理(用于确定浏览器人口统计数据)
  • 访问的页面(用于跟踪使用模式、内容受欢迎程度、转化)

但是!如果您打算执行所有这些操作,不妨使用 Google Analytics ;)

I agree with @Franci's response. Collect data to answer questions that you need answers too, don't collect data to ask questions that you just so happen to be able to answer.

In general, it is sometimes worth while to log the following:

  • IP (for possible blocking, determining country demographics, tracking use patterns)
  • Datetime (for tracking use patterns)
  • User agent (for determining browser demographics)
  • Page accessed (for tracking use patterns, content popularity, conversion)

But! If you're going to do all that, you might as well use Google Analytics ;)

°如果伤别离去 2024-08-15 02:28:57

为了收集数据而收集数据是一个坏习惯。我建议从另一端开始 - 弄清楚您想要回答的问题是什么,这将为您提供需要收集的数据。

Collecting data for the sake of data collection is a bad habit. I would suggest to start from the other end - figure out what are the questions you want to answer and that would give you the data you need to collect.

太阳公公是暖光 2024-08-15 02:28:57

这取决于你在做什么。我为一家大公司运营一个内部网站,我们在这里记录用户(公司员工)的每次点击。

但当然,我们的员工在使用公司内部应用程序时并不期望隐私。公共网站有责任保护其用户的数据,而最好的方法就是从一开始就不要收集这些数据。

我建议您随时收集汇总统计数据。例如,记录有多少用户登录、有多少用户点击了哪个链接等...但不要存储单个用户日志 - 用户 A 点击了 B 等。或者,如果您想获得调试信息,仅在有限的时间内存储它。如果用户单击按钮 24 小时后,您还没有收到错误报告,则您可能不再需要该数据。

it depends on what you're doing. i run an internal website for a large company, and here we log every click our users (employees of the company) make.

but of course, our employees have no expectation of privacy when using internal company applications. a public website has a responsibility to protect their user's data, and the best way to do that is not to collect it in the first place.

I would suggest collecting aggregate stats as you go. For instance, keep counters on how many users logged in, how many clicked on what link, etc... But don't store individual user logs - User A clicked on B, etc. Or, if you want to have debugging info, store it only for a limited time. If 24 hours after a user clicked a button, you haven't gotten an error report, you probably don't need that data anymore.

神经暖 2024-08-15 02:28:57

仅存储您绝对需要存储的内容。假设您存储的有关客户的任何数据都可能被窃取,并且某个地方的某人会找到恶意使用该信息的方法。然后问问自己你真正需要什么。

但话又说回来,我就是这样偏执。

Store only what you absolutely need to store. Assume that any data you store about your customers can be stolen and that someone, somewhere will find a way to use that information maliciously. Then ask yourself what you really need.

But then again, I'm paranoid that way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文