Ticket #1112 (closed New feature: answered)

Opened 2 years ago

Last modified 10 months ago

Obsolete: ActiveIP2Country plugin: More accurate IP-to-Country reporting

Reported by: vipsoft Owned by:
Priority: normal Milestone: 1.4 - Piwik 1.4
Component: New Plugin Keywords:
Cc: Sensitive: no

Description

ActiveIP2Country

The ActiveIP2Country plugin uses an IP-to-country database to determine the visitor's country. In contrast, Piwik normally guesses the visitor's country from his/her browser language and region.

Note: due to changes in IP block assignments, ActiveIP2Country does not attempt to correct earlier log_visit data.

This plugin uses any CSV (comma-separated values) file (named "ip-to-country.csv") containing IP address ranges (start and end expressed as longs) followed by a two letter ISO country code. Values may be double quoted. The country code can be upper or lower case.

The plugin will automatically generate a more compact, binary "ip-to-country.dat" file. To regenerate this file, simply remove it.

Performance

On my antiquated Athlon 1.4 GHz processor (test box):

  • search overhead adds ~ 2 ms per query

If shared memory is available:

  • minimum shared memory segment requires approx: 1 MB
  • loading .dat file into memory: ~ 1 ms

If updating the .csv file:

  • time to re-generate .dat file: ~ 7s

Requirements

  • Piwik 0.5.5 (or above)

To install

  • Extract the attached .zip file in the plugins folder.
  • Activate the plugin from the Settings | Plugins tab.

For support

  • Send me a tweet  @vipsoft
  • DO NOT CREATE A NEW TICKET HERE

Attachments

ActiveIP2Country.zip Download (0.6 MB) - added by vipsoft 2 years ago.
ActiveIP2Country.2.zip Download (0.6 MB) - added by vipsoft 2 years ago.
2010.01.12 update of ip-to-country.csv

Change History

Changed 2 years ago by vipsoft

Changed 2 years ago by vipsoft

Updates to the .csv file can be found at:

  • http://ip-to-country.webhosting.info/

Changed 2 years ago by vipsoft

2010.01.12 update of ip-to-country.csv

Changed 18 months ago by vipsoft

Proposal:

  • merge functionality from #45 into this plugin but re-use the existing country & continent columns, with fallback to region from browser language
  • add an installation/settings screen that (1) tests the server capability (e.g., mod_geoip or geoip extension installed, ability to use GEOIP_MEMORY_CACHE, etc; (2) button to run the geoipupdaterows script; (3) allows the user to select which geolocation implementation to use
  • refactor so that other implementations are available, e.g.,

(This isn't being suggested for #45 due to trademark issues.)

Changed 10 months ago by matt

I assume we can close this ticket, once GeoIP is in core? #1823

Changed 10 months ago by vipsoft

Yes, I'm rolling it into the new plugin.

Changed 10 months ago by vipsoft

  • status changed from new to closed
  • summary changed from ActiveIP2Country plugin: More accurate IP-to-Country reporting to Obsolete: ActiveIP2Country plugin: More accurate IP-to-Country reporting
  • resolution set to answered
  • milestone changed from Third Party Piwik Plugins to 1.4 - Piwik 1.4

Actually, I'll close this ticket now as the ip-to-country.csv file is longer being maintained. (4 months without an update)

Note: See TracTickets for help on using tickets.