Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How google ga.js is working?

Tags:

referer

I tried to analyse how google is transfering data. Especialy the document.referer.

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

PHP do not show the $_SERVER['HTTP_REFERER'] very reliable

Any idea?

Is there a uncompressed sourcecode of the ga.js in the world?

like image 493
hamburger Avatar asked Dec 15 '25 09:12

hamburger


2 Answers

Use Javascript unpacker and beautifier for the unpack.

like image 138
Adnan Avatar answered Dec 17 '25 01:12

Adnan


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

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

You are adding http://www.google-analytics.com/ga.js in your page.

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

And you can beautify ga.js using the tool Adnan has mentioned in his answer to see what the ga.js does after it is loaded

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

like image 29
Sarwar Erfan Avatar answered Dec 17 '25 02:12

Sarwar Erfan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!