views:

145

answers:

3

In Google Analytics there is one option to know the connection information about the client access. I think everyone knows about this, but my question is how the Javascript knows these details?

Am not talking about the IP or http/https suppose am using TATA Indicom, or cable connection for the use of Internet.

how google know about this??

+2  A: 

Javascript doesn't. That's done at google's end. It looks up who the requester's IP is registered to.

Draemon
+5  A: 

Javascript doesn't. Javascript can't provide Google your IP address.

Google then uses your IP address to analyze the network you're on and then provide the details to the Analytics users (of course, it's not always 100% accurate...but that's a given).

Justin Niessner
Hasn't reached wikipedia levels yet? ;-)
windfinder
Wait...I thought Wikipedia was already 100% acurrate (even if only 80% of the time).
Justin Niessner
I think you meant "cant". Edited.
Josh Stodola
This answer would be improved if it was updated to explain how Google does get the IP address. Unfortunately I can't edit it to add this information.
BenM
+1  A: 

When you load the javascript from google's server, then they have your external IP address. If you are at work and all the traffic most likely goes through a firewall, then they have the IP of the firewall and not the IP address that the internal network hands out.

There's a sysytem on how IP addresses are allocated which is partly how they can do rudimentary geolocation for you stats.

easement