-
-
Notifications
You must be signed in to change notification settings - Fork 456
Maxmind GeoIP Module
Maxmind GeoIP is a module that will perform geo-location lookups of a visitor's Ip address using the Maxmind GeoLite2 City database or the Maxmind GeoIP City/Isp/Org Web Service.
This module requires explicit activation in order to include geolocation data in tracking requests.
- Download the Maxmind GeoLite2 City database from the Maxmind website: https://dev.maxmind.com/geoip/geoip2/geolite2/
- Place the database file in a directory you create called "maxmind" within OWA's data directory (e.g. /pathto/owa/owa-data/maxmind/GeoLite2-City.mmdb).
- Activate the module via the CLI or Modules page in the admin interface.
Note: if you already have this particular Maxmind database installed on your server, you may specify an alternate path for OWA to use by setting the OWA_MAXMIND_DATA_DIR
constant in your owa-config.php. For example:
define( 'OWA_MAXMIND_DATA_DIR', '/path/to/maxmind/data/dir/');
The module may also be configured to use the Maxmind City/Isp/Org Web Service instead of a local database. To use this web service you must first purchase a web service license key from Maxmind at http://www.maxmind.com/app/web_services.
Once you have obtained a key, you will need to set two settings by adding the following to your owa-config.php configuration file:
$this->set('maxmind_geoip', 'lookup_method', 'geoip_city_isp_org_web_service');
$this->set('maxmind_geoip', 'ws_license_key', 'YOUR_LICENSE_KEY');