Smart IP Drupal 8 settings explained

The following is the explanation of each Smart IP Drupal 8 settings.

Database Update Status

This Smart IP section setting will only appear if your Data Source is either IP2Location binary database or MaxMind GeoIP2 binary database. It display the status of database update process from manually executed or automatically during cron run. If the database update failed, you can manually force the database update by clicking the "Update database now" button.

Smart IP database status

Manual Lookup

This allows to query the geolocation information of IP address associated with it.

Smart IP manual lookup

Smart IP Source

Smart IP needs a Data Source to query the IP address' geolocation and there are several options to choose from.

First lets take a look at "Smart IP fallback data source status". In this section, it shows the status of Smart IP fallback data source if your system supports or has them. If your main data source failed to provide the geolocation details, the Smart IP fallback will provide the geolocation details (if one of them is available in your system).

Smart IP fallback data source status

The data source are sub modules of Smart IP and you are required to enable at least one of them as your main data source. Each data source option has its own settings and we will take a look at each of them.

IP2Location binary database

This is the binary database of IP2Location. There are two versions available: lite version (free) and licensed version. In lite version, requires you to manually download the IPv4 and IPv6 binary database files here (Note: IP2Location will require you to register an account first). The automatic binary database update is not yet available in lite version. The IP2Location product edition is the level of geolocation details (DB1 to DB24. Note: only few product editions are available to lite version while the licensed version got the complete set to choose from). The higher the IP2Location product edition, the more geolocation details. There are three options in "IP2Location caching method" setting: No cache; Memory cache; Shared memory. The "No cache" option will directly query the binary database and the "Memory cache" or "Shared memory" options will speed up the query/lookup process but it requires that your system has sufficient memory. In "IP2Location binary database custom path" field is where you enter the full path where the IP2Location binary database files are located in your server. If left empty, Smart IP will assumed the path of your Drupal private file system.

Smart IP IP2Location binary database lite settings

In licensed version, you are required to provide IP2Location download token which you can get here (Note: IP2Location will require you to register an account first). Manual and automatic binary database update are available in this version.

Smart IP IP2Location binary database licensed settings web service

This is a free web service that uses the IP2Location free version database and it requires API key. In my opinion this option is slow because it is free and it has more users are using/querying its database service. The "IPInfoDB API version" setting enables you to select which version you want to use. Populate the "IPInfoDB key" with the API key you've got after registering here.

Smart IP web service settings

MaxMind GeoIP2 binary database

There are two "MaxMind GeoIP2 binary database version" options: Licensed and Lite. The Licensed is the paid version and Lite is the free version. Selecting "Licensed" option will require you to enter your license key at "MaxMind GeoIP2 license key" field (you can view your license key here). You can select Country or City at "MaxMind GeoIP Legacy binary database edition" (Note: The binary database file of City is larger than Country. For performance, it is recommended to select Country if your application only requires Country level).

Smart IP MaxMind GeoIP2 binary database settings (licensed)

The "Automatic MaxMind GeoIP Legacy binary database update" setting allows the site owner to use automatic database feature and the binary database will be saved in your Drupal private folder. Choosing to manually update the database will allow to set the "MaxMind GeoIP Legacy binary database custom path" to where you uploaded the binary database file in your server. Lite version binary database can be downloaded manually here and the Licensed version binary database can be downloaded manually inside your MaxMind account.

Smart IP MaxMind GeoIP2 binary database settings (lite)

MaxMind GeoIP2 Precision web service

This is the web service version of MaxMind and it is not free and it requires a license key. There are three "MaxMind GeoIP2 Precision Web Services" options: Country; City; Insights. You can check here for more details of these services. Populate the "MaxMind GeoIP2 Precision user ID" and "MaxMind GeoIP2 Precision license key" which can be found here.

Smart IP MaxMind GeoIP2 Precision web service settings

Smart IP Settings

The "Roles To Geolocate" setting allows which Drupal user role will have geolocation process. The selected role(s) will have their IP address queried for geolocation. Enabling the "Save user's location details upon creation" will query the IP address for geolocation of all new users registered and stored these geolocation data to Drupal $user->data object with array key of "geoip_location_original". If "Don't save location details of visitors from GDPR countries" is enabled, the location details of all visitors from GDPR countries will not be saved. The "Time zone format" setting will enable to select between: Identifier (E.g Asia/Manila) or UTC/GMT Offset (E.g +08:00) time zone formats (it is required to install the Geo Time Zone). All Drupal page paths listed at "Acquire/update user's geolocation on specific Drupal native pages" will have the geolocation process logic for Drupal role(s) selected.

Smart IP settings

Device Geolocation Settings

We know that Device Geolocation uses the W3C Geolocation and Google geocoder to get the geolocation of the visitor. Both are processed in javascript, and if this is enabled in a page, it will prompt a user "Would you like to share your location with this site?" alert box and if the visitor choose cancel, this alert box will prompt again every time he visit that page. One of the Device Geolocation feature is the "Frequency of user's geolocation checking" this prevents to prompt the alert box if the visitor choose cancel for a period of time specified in this configuration. Now if the page is cached, this feature has no effect, because the logic of checking the period of time is done in backend so we need an AJAX call to make this feature "Frequency of user's geolocation checking" works too in pages that are cached and ticking the checkbox "Use AJAX in user's geolocation checking (useful if the site or pages listed above are cached)" will do this AJAX call job. The "Google map API key" is needed for using the Google geocoder service and you can get your API key here. The default region of Google map service is "United States". If you want to change your application to bias the geocoding results towards a region of your choice, update the "Google map region" field (this field accepts Unicode region subtag identifiers). By default, the Google map service uses the user's preferred language setting as specified in the browser. If you want the Google map service to ignore the browser's language setting, update the "Google map language" field using two-letter ISO 639‑1 code.

Device Geolocation Settings

Smart IP Debug Tool

This allows to assign any IP address to any Drupal roles in Smart IP context for testing purposes. Tick the "[Drupal role] role in debug mode" checkbox and populate the "IP address to use for [Drupal role] role testing" field with the desired IP address to spoof.

Smart IP Debug Tool

For Smart IP Drupal 7 version, settings explained can be found here.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.