0

我在跟踪我的页面浏览量或事件时没有问题。

我只是在 Chrome Tool 或 Firebug 的 NET 选项卡中看不到任何 http 请求。

他们使用不同的协议吗?一切都只是发送onunload吗?

Google Anayltics 何时何地发送跟踪请求?

4

1 回答 1

1

他们的 Javascript 读取 cookie,然后在请求期间请求 GIF,然后他们将参数传回系统进行跟踪。当您查看 Firebug 时,请查看ALLImages。您应该GIF会在历史记录中看到从 Google Analytics 转移的内容。当他们请求时,GIF他们还将一长串GET变量传递给 URL。他们还应该为您提供跟踪cookie。这也是用Javascript设置的。

以下是有关Google Analytics 工作原理的更多信息。

跟踪代码的工作原理

一般来说,谷歌分析跟踪代码 (GATC) 检索网页数据如下:

1. A browser requests a web page that contains the tracking code.
2. A JavaScript Array named _gaq is created and tracking commands
   are pushed onto the array.
3. A <script> element is created and enabled for asynchronous
   loading (loading in the background).
4. The ga.js tracking code is fetched, with the appropriate
   protocol automatically detected. Once the code is fetched and loaded, the
   commands on the _gaq array are executed and the array is transformed
   into a tracking object. Subsequent tracking calls are made directly to
   Google Analytics.
5. Loads the script element to the DOM.
6. After the tracking code collects data,
   the GIF request is sent to the Analytics
   database for logging and post-processing.
于 2013-07-27T17:50:03.333 回答