谷歌分析 Cookie [英] Google analytics Cookies

查看:20
本文介绍了谷歌分析 Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的浏览器中,如果我拒绝创建 cookie,cookie 将按名称 __utma、__utmb 等创建.我认为这个 cookie 是用于谷歌分析的.任何人都知道谷歌如何创建这个 cookie,即使浏览器不支持 cookie creaton.谢谢

In my browser cookies are creating by name __utma,__utmb and so on if i reject cookie creation.I think this cookie is for google analytics.Anybody know how google creating this cookie even browser not supporting cookie creaton.Thanks

推荐答案

是的,那些是 Google Analytics 的 cookie.

Yes, those are Google Analytics' cookies.

以下是 GA 设置/更新它们的方式:

Here's how GA sets/updates them:

当浏览器请求包含 GA 跟踪代码 (GATC) 的网页时,GATC 会在浏览器中设置/更新 cookie.然后,GATC 通过 __utm.gif(也称为跟踪像素")的 HTTP 请求将 cookie 中保存的数据发送回 GA 服务器.cookie 中保存的数据与其他信息一起附加到该请求中.您可以通过检查此请求utmcc"来确定哪些信息是从 cookie 中获取的——cookie 值是右侧的所有内容,例如:

when a browser requests a web page that contains the GA tracking code (GATC), the GATC sets/updates the cookies in browser. The GATC then sends the data held in the cookies back to the GA servers via an HTTP Request for __utm.gif (aka, the "tracking pixel"). The data held in the cookies are appended to that Request along with other information. You can identify which of that information was taken from the cookies by checking this Request " utmcc"--the cookie values are everything on the right side, e.g.:

utmcc=__utma%3D117243.1695285.22%3B%2B __utmz%3D117945243.1202416366.21.10.utmcsr%3Db%7C utmccn%3D(referral)%7C utmcmd%3Dreferral%7C utmcct%3D%252Fissue%3B%2B

utmcc=__utma%3D117243.1695285.22%3B%2B __utmz%3D117945243.1202416366.21.10. utmcsr%3Db%7C utmccn%3D(referral)%7C utmcmd%3Dreferral%7C utmcct%3D%252Fissue%3B%2B

在基本实现中,Google Analytics 创建/设置/更新三个第一方 Cookie:

In the basic implementation, Google Analytics creates/sets/updates three first-party cookies:

__utma:访客 ID,有效期为两年;

__utma: Visitor ID, which persists for two years;

__utmb:会话 ID,持续 30 分钟不活动

__utmb: Session ID, which persists for 30 minutes of inactivity

__utmc : 也是会话 ID,在用户退出浏览器之前一直存在;

__utmc : also Session ID, which persists until the user quits the browser;

这些不是 GA 使用的唯一 cookie,这些只是标准集;例如,__utmz 用于存储 GA-account-owner 定义的活动变量的值;__utmv 用于创建自定义访问者细分,__utmx 用于 Google 网站优化工具(拆分路径测试).

These aren't the only cookies GA uses, these are just the standard set; for instance, __utmz is used to store values of GA-account-owner-defined campaign variables; __utmv is used to create custom visitor segments, and __utmx is for the Google Website Optimizer (split-path testing).

访问者标识符 __utma 由四个部分组成:域哈希、随机唯一 ID、时间戳(标记初始访问、先前会话、当前会话)和会话计数器(仅一个整数);即,(域哈希).(随机).(初始时间).(前时间).(当前时间).(会话计数)

The Visitor Identifier, __utma, is comprised of four components: a domain hash, a random unique ID, timestamps (marking initial visit, previous session, current session), and a session counter (just a single integer); i.e., (domain hash).(random).(time initial).(time previous).(time current).(session count)

会话标识符__utmb 和__utmc 分别由域哈希+时间和域哈希组成;即,__utmb = (域哈希).4.10.(时间);__utmc =(域哈希)

The Session Identifiers, __utmb and __utmc, are comprised of a domain hash + time, and domain hash, respectively; i.e., __utmb = (domain hash).4.10.(time); __utmc = (domain hash)

这篇关于谷歌分析 Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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