How does google analytics collect its data?

后端 未结 8 881
夕颜
夕颜 2020-12-12 19:33

Yes, I know you have to embed the google analytics javascript into your page.

But how is the collected information submitted to the google analytics server?

8条回答
  •  囚心锁ツ
    2020-12-12 20:31

    Without looking at the code, I assume their data is collected from the HTTP headers they receive in the asynchronous request.

    Remember that most browsers send data such as OS, platform, browser, version, locale, etc... Also they do have the IP so they can guesstimate your location. And I assume they have some sort of clever algorithm to decide whether you are a unique visitor or not.

    Time on the site is probably calculated by using an onUnload() event.

提交回复
热议问题