Use IP2Location geolocation database to lookup for accurate visitor location in Piwik 2.0. It enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type that any IP

4.1.2 2022-11-30 22:31 UTC


Latest Stable Version Total Downloads


This IP2Location plugin enables more accurate location lookup in your Matomo (Piwik) visitor log.

You need a IP2Location BIN database to make this plugin works. Database is available for free at

https://lite.ip2location.com or https://www.ip2location.com for a commercial database.

Installation / Update

  1. Login into your Matomo administrator page.
  2. Go to System > Plugins.
  3. Click on the Install New Plugins button at the bottom of the page.
  4. Search for IP2Location from the plugin page.
  5. Install and activate the plugin.
  6. Upload a IP2Location BIN database to misc folder.
  7. Navigate to System > IP2Location page to make sure the BIN database is detected by the plugin.
  8. Go to System > Geolocation.
  9. Select IP2Location as provider and save.

Configure settings

You can visit IP2Location Settings by selecting the menu on the left pane (under System). This plugin support geolocation lookup using IP2Location BIN file and web service.

To use BIN file, please download it from the below links

To use web service, please sign up for the API key at

How to import the IP2Location BIN file for usage

You should copy the BIN file into /var/www/html/misc folder (for default installation). If you customize the installation path, it should be the misc folder inside your root folder.

If you are using Piwik docker image, then you can use below command to copy the BIN into piwik container.

sudo docker cp {your_local_bin_file_location} {your_piwik_container_name}:/var/www/html/misc


How to I configure the plugin?

Login as administrator, then go to System > IP2Location.

Where to download IP2Location database?

You can download IP2Location database for free at https://lite.ip2location.com or commercial version from https://www.ip2location.com

Can I use IP2Location Web service?

Yes, please purchase credits from https://www.ip2location.com/web-service and insert your API key in the settings page.

Change Log


  • Added better handler when IP2Location BIN database file is not loaded.


  • Updated install instructions.


  • Fixed class name error.


  • Fixed array assignment issues.


  • Fixed syntax error in PHP 7.1.


  • Fixed class error.


  • Minor changes and fixes.


  • Update README.md


  • Updated version due to licensing error.


  • Updated version due to licensing error.


  • Added instructions for automated IP2Location database update.


  • Added screenshot and FAQ.


  • Bugs and typos fixed.


  • Updated version number.


  • Removed testing data.


  • Added IP2Location settings menu.

  • Added support for IP2Location Web service.


  • Removed compatibilities with Piwik 2.x. Version 2.3.0 is the last version supporting Piwik 2.x.

  • Prevented plugin from overwrite existing location provider.

  • Appeared as a separated location provider under admin area.

  • Supported visitor log and live view directly in admin area.

  • Database file no longer stored within plugin folder to prevent deletion/modification during updates.

  • Database file is stored in /path/to/piwik/misc/ starting this version.


  • Fixed error when BIN file is not readable. Added backward compatible.


  • Updated to IP2Location PHP 8.0.2 library.


  • Added custom report to view additional information such as Time Zone, ZIP code, usage type.


  • Updated to IP2Location 7.0.0 library


  • First release for Piwik 2.0

IPv4 BIN vs IPv6 BIN

Use the IPv4 BIN file if you just need to query IPv4 addresses.

Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.


GPL v3 / fair use


Website: https://www.ip2location.com Email: support@ip2location.com