Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP2Location Visitor IP to Country #4092

Closed
anonymous-matomo-user opened this issue Aug 20, 2013 · 3 comments
Closed

IP2Location Visitor IP to Country #4092

anonymous-matomo-user opened this issue Aug 20, 2013 · 3 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.

Comments

@anonymous-matomo-user
Copy link

This plugin converts visitor IP into country, city, latitude, and longitude using IP2Location database.

You can download IP2Location database from http://lite.ip2location.com (Free) or http://www.ip2location.com (Commercial).

Please change the path in /plugins/IP2Location/IP2Location.php to point the correct path of your IP2Location database BIN file.

Download the plugin here:

http://www.ip2location.com/developers/piwik
Keywords: ip2location, geolocation, ip, lookup, third-party-plugin

@halfdan
Copy link
Member

halfdan commented Sep 9, 2013

Hi hexasoft,
thanks for the nice plugin! Would it be possible to share it on Github? This way, people could contribute and e.g. provide translations for your plugin.

Short review:

In line 56 you use:

$record = $loc->lookup($_SERVER['REMOTE_ADDR'], IP2Location::ALL);

to lookup the IP and location. It is better to use $visitorInformation['location_ip'] since it contains the true IP address. REMOTE_ADDR might be a proxy or something else and not the real IP of the visitor. location_ip will also be masked if AnonymizeIP is used.

@anonymous-matomo-user
Copy link
Author

Thanks. Updated.

@mattab
Copy link
Member

mattab commented Feb 6, 2014

Along with the Piwik 2.0 release and new design for Piwik, we have also launched the official Plugins Marketplace to let any developer share their work to the thousands of Piwik users worldwide.

Maybe you'd like to publish your plugin there?

In any case, keep up the good work and we hope you enjoy Piwik 2!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants