The Magento 2 GeoIP Lookup extension uses three built-in databases and services to retrieve customer location: MaxMind, IpToCountry, and IpApi. In addition, you can enable one or more databases at the same time, which allows you to automatically retrieve geographic locations from other databases in case one of them doesn’t respond.
So, which database takes priority when retrieving geolocation if all three databases are enabled? In fact, the priority is the same as the order in which the databases appear in the admin panel: MaxMind, IpToCountry, and then IpApi.
Hence, the GeoIP Lookup extension uses the first service that responds. For example, if the MaxMind database does not have any information about a specific IP address, the plugin requests data from the IpToCountry service.
Please note that if you want to get geolocation info from a specific database, the other two must be disabled from the extension backend.
Can I change the database priority
The database priority in the Magento 2 GeoIP Lookup extension cannot be changed. However, you can specify it when making REST API requests.
GeoIP Lookup REST API allows you to integrate your own development with the GeoIP Lookup module. Please follow the detailed instructions on how to access the REST API and then specify the service priority when making the request. This way, you can return all available geolocation information on the IP address, setting the order of the services in the REST API link after the IP parameter.
Note that the database priority you set when making a REST API request will be changed only for your specific request.
You are welcome to check out our FAQs section or contact our Plumrocket support team for any additional details.
|