User country flags, how are they determined?


I’ve just noticed something that puzzles me just a little. I find it sometimes interesting to know where exactly in France my visitors come from. In my dashboard, I have the following info:

However, gives me Bénin in western Africa as the geolocation of that IP address.

I’ve checked the plugins/UserCountry/flags and the image for BJ is there. So now I’m wondering, out of curiosity, what does the vanilla Piwik install use to determine a visitor’s country?


You can use GeoIP plugin to get geo information from the IP: Plugin using GeoIP to accurately detect visitor countries, cities, and continent · Issue #5465 · matomo-org/matomo · GitHub

Thanks Matt.

Sorry that I didn’t pay attention to the subforum where this thread was being started (Feature Suggestions). Could an admin move it to the General Questions forum? Thanks.

I’ve installed everything as indicated including the fixing of previous reports but I still don’t see any city information in the “Visitors in Real Time” widget. Is my assumption that the information is normally available in that widget (of course, with the GeoIP plugin installed) correct?

Also, the flag of the visitor in my original post hasn’t changed from FR to BJ.

Actually, I was expecting to have the city appear in this tooltip:

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.

Hello Matt,

Yes I’ve seen that in the change list as I updated one of my websites yesterday night. (I was about to come back here: on Wednesday, someone from Myanmar has been reported as being from France… 1.9 hasn’t updated the origin countries in the detailed visitor log. i can understand that)

I have received no incorrectly-flagged visits yet so I can’t give feedback about how better 1.9 behaves.

Anyway, it’s great news. We just need to have the city in the tooltip and all will be perfect.

We just need to have the city in the tooltip and all will be perfect.[/quote]

I take that back. The city and region now appear in the tooltip. Perfect.