Magento 2 GeoIP Lookup v1.x Configuration

General

Here you will learn how to configure Magento 2 GeoIP Lookup v1.x extension correctly.

In the main menu go to “Plumrocket” tab > select “GeoIP Lookup” extension > navigate to “Configuration” section.

Step-by-Step actions:

  1. Enable Extension”: this option allows you to enable or disable this GeoIP Lookup extension for Magento 2.
  2. “Serial Key”: enter the unique serial key provided to you after purchasing the extension. Note: In most cases, this field will be pre-filled with a serial key automatically, and the green checkmark will be displayed. To find and paste your serial key manually, read the Serial Key Activation article.

Services

In this section, you can learn how to connect to a database from which you want to retrieve data. You can enable one or more databases at a time. This is useful for the automatic retrieval of geographic location information from other databases in case one of them fails.

Maxmind GeoIP Database

When this database is enabled, you can retrieve information about the country, state, city, postal code, time zone, locale, latitude, and longitude.

Step-by-Step actions:

  1. Enable Maxmind GeoIP“: this option allows you to enable or disable the Maxmind GeoIP database.
  2. Database Status“: you can view the installation status and the current version of the database in this field.
  3. Installation Method“:
    • set to “Automatic Installation” if you want to install the Maxmind GeoIP database automatically. Then press the Install Database button.
    • set to“Manual Installation” if you want to install the database manually. Please follow our Databases Manual Installation developer’s guide to learn how to install the databases manually.

IpToCountry GeoIP Database

If you don’t need detailed location information, enable the IpToCountry GeoIP database. It includes only the list of countries.

Step-by-Step actions:

  1. Enable IpToCountry GeoIP“: this option allows you to enable or disable the IpToCountry GeoIP database.
  2. Database Status“: you can view the installation status and the current version of the database in this field.
  3. Installation Method“:
    • set to “Automatic Installation” if you want to install the IpToCountry GeoIP database automatically. Then press the Install Database button.
    • set to“Manual Installation” if you want to install the database manually. Please follow our Databases Manual Installation developer’s guide to learn how to install the databases manually.

Ipapi.Com – GeoIP API

Ipapi provides an easy-to-use API interface that allows you to view various information related to IPv4 and IPv6 addresses.

Step-by-Step actions:

  1. Enable GeoIP API“: this option allows you to enable or disable the GeoIP API.
  2. Acess Key“:
    • Register on https://ipapi.com/ and get your free API Key. Under the free plan, you are limited to 10,000 lookups a month and can retrieve only location data. To get more data and increase the lookups limit, consider paid plans.
    • Enter your API key in the Access Key field. Then, press the Test Connection button and a green checkmark will be displayed informing you of a successful connection.

GeoIP Lookup Test

In this section you are able to test the specific IP adress and see what information is displayed.

Step-by-Step actions:

  1. IP Address“: enter any valid IP address to test GeoIP Lookup. Your own IP address is automatically filled in.
  2. Test GeoIP Lookup“: press the Get Location From IP button to retrieve location data from the entered IP address.
  3. IP Geolocation Information“: if the IP address is correct and you have at least one of the three services enabled, then the location data will be displayed in this field. By default, the GeoIP Lookup extension uses services in the order in which they appear in the backend of the extension’s configurations (Maxmind > IpToCountry > IpApi).
  4. View Location on Map“: click on the provided link to view the location of the IP address on Google Maps. Please note that the link is created based on Latitude and Longitude data returned from the GeoIP service. Hence, if the service for some reason did not return Latitude and Longitude data, the location link will be incorrect.
  5. REST API“: click on the provided link to see what location data you can get with the REST API. Read more about REST API and other methods of retrieving GeoIP data in our Rest API Reference.
Was this article helpful?