IP2Location Piwik Plugin

This plugin converts visitor's IP address into geographical location such as country, region and city, using IP2Location BIN database. It offers you an accurate geolocation tracking compare to default geolocation installed that guess a visitor's country based on language they use.

The plugin works well with DB3.LITE (free) or DB3 (commercial).

Download IP2Location Piwik Plugin

This plugin works on Piwik version 2.12.0 and above.


  1. Download and decompress this Piwik plugin package.
  2. Copy the package, IP2Location folder, to /plugins/ in the server. Note: The folder name in the server must be named as IP2Location
  3. Download IP2Location database from DB3.LITE (free) or DB3 (commercial).
  4. Upload the database file (.BIN) into /plugins/IP2Location/data. Note: Please create the data folder if the folder doesn't exist.
  5. Login to piwik admin area.
  6. Click on Settings->Plugins menu.
  7. Search for IP2Location entry and activate the plugin by clicking on the Activate link.
  8. You're done.


Note: Please make sure you are using the Default geolocation option for our plugin to function correctly.
IP2Location piwik plugin


If you successfully installed the plugin, you shall see the IP2Location under the Settings section, as shown in the below picture:
IP2Location piwik settings

On the IP2Location, you are able to check if the plugin able to read the BIN file in the data table. In addition, you may also perform the lookup on this page.
IP2Location piwik lookup


The plugin will start look up and display the geoloation information for the new visitors. Please take note that this plugin will not edit the geo location data recorded before this plugin installation.


IP2Location Report

This plugin has included one custom report allowing user to view the traffics of the below information:

You can view the report by clicking on the Visitors->IP2Location Report. Below are the screen shot of the custom report: IP2Location Report

You may need to install the below BIN database to display the relevant information.


Sample IP2Location Databases (BIN)

The following evaluation copy of the database file has limited range of IP address information compare to commercial. For evaluation purpose, you can query IP addresses from (IPv4) or 2A04:0:0:0:0:0:0:0-2A04:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF (IPv6).

Sample Packages IPv4 IPv6
IP2Location DB1 Sample Bin File469.88 kB73.62 kB
IP2Location DB2 Sample Bin File38.56 MB98.25 kB
IP2Location DB3 Sample Bin File18.59 MB83.64 kB
IP2Location DB4 Sample Bin File55.23 MB106.02 kB
IP2Location DB5 Sample Bin File29.55 MB89.62 kB
IP2Location DB6 Sample Bin File66.06 MB109.74 kB
IP2Location DB7 Sample Bin File61.18 MB115.26 kB
IP2Location DB8 Sample Bin File72.27 MB119.08 kB
IP2Location DB9 Sample Bin File34.62 MB91.86 kB
IP2Location DB10 Sample Bin File78.32 MB122.97 kB
IP2Location DB11 Sample Bin File35.35 MB92.44 kB
IP2Location DB12 Sample Bin File78.86 MB123.76 kB
IP2Location DB13 Sample Bin File33.92 MB90.82 kB
IP2Location DB14 Sample Bin File80.28 MB124.37 kB
IP2Location DB15 Sample Bin File38.43 MB96.03 kB
IP2Location DB16 Sample Bin File85.19 MB129.27 kB
IP2Location DB17 Sample Bin File41.61 MB97.87 kB
IP2Location DB18 Sample Bin File93.15 MB137.92 kB
IP2Location DB19 Sample Bin File75.10 MB119.78 kB
IP2Location DB20 Sample Bin File95.71 MB139.09 kB
IP2Location DB21 Sample Bin File42.24 MB98.41 kB
IP2Location DB22 Sample Bin File100.27 MB141.85 kB
IP2Location DB23 Sample Bin File75.70 MB120.75 kB
IP2Location DB24 Sample Bin File101.21 MB142.79 kB