Would be great to add a feature where i can use the piwik API to get what country a user is coming from based on ip address: Example: $url = "http://analytics.com/"; $url .= "?module=API&method=Actions.getCountry"; $url .= "&userIP=220.127.116.11; $fetched = file_get_contents($url)
But I think more generally there could be a simple API function that will be a proxy to the GeoIP provider currently in use. This could have many interesting uses. The function should check for: Piwik::checkUserHasSomeViewAccess()
All info should be returned for a given IP adress, and would return an array containing country/country_code/region/region_code/city/lat/long/etc.
(In ) Fixes #3534, add UserCountry.getLocationFromIP method as proxy for GeoIP functionality.