How does google ga.js work?

I tried to analyze how Google transmits data. Specify document.referer specifically.

for me its not ajax (firebug does not show any ajax activity).

PHP does not show $ _SERVER['HTTP_REFERER']very reliable

Any idea?

Is there any uncompressed ga.js source code in the world?

+3
source share
4 answers
+2
source
for me its not ajax (firebug do not show any ajax activity).

Just pay attention ... look at the JS or Firebug tab.

You add http://www.google-analytics.com/ga.jsto your page.

So, even before the page was loaded, the googgle-analytics server already received a request sent to it :) There is no need to use ajax.

ga.js , , , ga.js .

==== EDIT ==== enter image description here

+2

ga.js http://www.google-analytics.com/u/ga_debug.js

It is still minimized and compressed, but it has a lot of logging and debugging information.

http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshooting.html#gaDebug

+2
source

After downloading the analytics file, it launches and reads document.refererin Javascript, and then sends this information to Google. You can see all the parameters that it collects by looking at your dev console browser - here is the image from Google Chrome:

enter image description here

0
source

Source: https://habr.com/ru/post/1787941/


All Articles