HTML5 Geolocation Plugin

Hey there,

i would like to use the html5 geolocation tag with piwik:

I already implemented a plugin which saves the following data in log_visit via setCustomData:
[li] geolocation (true / false)
[/li][li] geolocation_longitude (decimal 7,2)
[/li][li] geolocation_latitude (decimal 7,2)

I have two questions regarding this:

1.)How do I return this data via my plugin API.php-file? (I want to return the position data of all users with given position data in a period like


2.) What is the right way to archive this data?

I would say that the right way will be to have the HTML5 detection work as part of the GeoIP plugin. Please post a comment in Include GeoIP in core after improvements · Issue #1823 · matomo-org/matomo · GitHub - I plan to work on this in the next couple months, so maybe we could work on supporting html5 geo location as well.

Good news: GeoIP is now integrated in Piwik, enabling Accurate Visitors Geolocation in your Analytics reports. To enable GeoIP go to the Settings > Geolocation admin page, and follow the short instructions.

You can also get an even more accurate Country & City Database from here to enjoy top accuracy in detecting your visitors locations.

See also the documentation about Geolocation - Analytics Reports in Piwik.