Shahin

Geolocation

Intermediate
Updated Jul 11, 2026 Shahin editorial 2 min read
PronunciationEN/ˌdʒiːoʊloʊˈkeɪʃən/

Geolocation is the determination of where a visitor is, done in analytics almost always by looking up their IP address in a location database rather than by asking the device.

Two entirely different mechanisms share this one name, and confusing them causes most of the misreadings. The first is the browser Geolocation API, which requires explicit user permission, returns coordinates accurate to tens of metres and serves mapping and delivery applications. The second is an IP address lookup, which asks no permission, shows the user no prompt and reaches city level at best. Analytics reports always come from the second mechanism, so what is shown is where the traffic leaves the network rather than where the person is sitting, and mobile operator gateways, corporate networks and VPNs each pull those two apart. The privacy layer sits here too: common practice is to truncate or mask the IP address before storage, keeping the derived country and city but not the address itself.

FAQ

Sources:MDN — Geolocation API