Resource – Geolocation
Introduction
Geolocation is the technology that allows identifying the geographic location of a device or user in real time. It can be based on different methods, such as IP address, Wi-Fi networks, cell towers, and GPS sensors. This service is widely used in map applications, transportation, security, targeted advertising, and data analysis. The accuracy of geolocation can vary from an approximate estimate to an exact location.
We also enable geolocation collection via Google API (contracted with a provider) to provide more accurate geolocation.
Default geolocation collection (Installed with agents)
The geolocation installed with the agents is a service that provides information based on the user’s IP address. It uses an IP address database to estimate the user’s location but does not provide exact accuracy, as it depends on the Internet Service Provider (ISP) and network infrastructure.
How It Works:
- The agent makes an HTTP request to the API, providing the IP to be located.
- The API returns information such as latitude and longitude.
Limitations
- The accuracy of the location depends on the Internet Service Provider (ISP).
- The obtained position may be several kilometers away from the actual location.
- There is no support for GPS-based geolocation.
Geolocation Collection via Google API
The Google Geolocation API uses GPS, Wi-Fi networks, and cell towers to obtain a much more accurate location than IP-based geolocation alone. It can be used to track mobile devices and provide real-time information.
This method must be separately contracted (See the “Geolocation” section.) and the token should be inserted into the advanced settings when downloading the agent.
How It Works?
- The user makes an HTTP request to the Google Geolocation API:
https://www.googleapis.com/geolocation/v1/geolocate?key=API_KEY
- The request can include nearby Wi-Fi networks, cell towers, and the device’s IP.
- Google returns a response with latitude, longitude, and an accuracy radius (in meters).
Advantages
- Greater accuracy (can reach a few meters).
- Works with Wi-Fi networks, cell towers, and device sensors.
Summary Comparison
Feature | Default Geolocation | Google Geolocation API |
Database | IP addresses | GPS, Wi-Fi, cell towers |
Accuracy | Low (based on ISP) | High (can be exact with GPS) |
Requires API Key? | No | Yes |
Cost | Free (with request limit) | Paid after free limit |
If you need an approximate location (city/state), IP-API is a good free option. However, if you need an accurate location (meters of precision), Google API is the best choice.