Expose or return geolocation result

Since I’ve been dealing a lot with restricted capacity servers / shared hosting scenarios, the following suggestion is sparked by limited resources:
If there was a simple way to let PIWIK return the geolocation detection result of the current visitor, ideally by optionally returning a JSON object instead of a “no response” or image, that would replace the need to run a separate, duplicate geolocation instance or to calling yet another API to request the location.
There are use cases in which it is sufficient to receive a geolocation result async, for example if all you want to do is show the visitor a hint to switch interface language.
I have seen managed server scenarios offering a preconfigured PIWIK installation including geolocation, it would be a great extra benefit if that could be accessed easily outside of the tracking scope.

Hope that sounds sound & thanks for the read,
keep up the good work!


I’m not sure if that solves more issues than it introduces, so I guess that will never be a part of core Piwik.

But as Piwik supports Plugins it should be possible to write both parts (receiving and sending) as a plugin.
Check out this alternative Geolocation plugin as an inspiration: