跟踪Cookie如何工作? [英] How do tracking cookies work?

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

问题描述

我们正在尝试找出常见的网络跟踪软件如Google Analytics(分析)。

We're trying to figure out how common web tracking software works, like Google Analytics.

我们注意到,来自网络的许多跟踪Javascript代码会在访问者的系统上创建多个Cookie,通常是三个Cookie - 一个在结束时过期

We've noticed that much tracking Javascript code from around the web creates multiple cookies on the visitor's system, usually three cookies-- one that expires at the end of the day, one that expires at the end of the week, and one that expires at the end of the month.

我们的团队一直在辩论为什么这是常见的,我们一直在撕开我们的头发,找出为什么可以这样做。

Our team has been debating why this is common and we have been tearing our hair out to figure out why one might do this.

我们唯一能想到的是性能:这样你可以计算访问者是否每天重复,周或月,而不必一直对OLTP数据库进行大量查询。

The only thing we can think of is performance: this way you can calculate whether a visitor is repeat per day, week, or month without having to do heavy queries on the OLTP database all the time. But we can conceive of ways to make it work anyway.

以这种方式创建跟踪Cookie的优点是什么,以及您认为如何使用它们

What are the advantages to creating the tracking cookies in this way, and how do you think they're being used by others?

推荐答案

他们可能以这种方式使用Cookie来确定访问域的频率。如果您访问该网站,并注意到您仍然有过期的Cookie,那么这在访问频率方面很重要。如果您拥有的是每周和每月,那么很明显,您没有访问过该网站至少一天,并在一周内结束。

They likely are using cookies in this manner to determine the frequency of visits to the domain. If you visit the site and it notes that you still have the day-expiring cookie, then that is significant in terms of your frequency of visitation. If all you have are the weekly and monthly, then it is clear that you haven't visited the site for at least a day, and last within the week.

是没有规则说,这是唯一的方法来做到这一点。可以跟踪单个cookie并在服务器上存储统计信息。

There is no rule that says that this is the only way to do this. One could track with a single cookie and store statistics on the server.

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

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