Matomo GeoIP database VS Google Analytics

Scenario on a test server:

Matomo runs GeoIP 2 php and https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz (updated weekly)

Google Analytics runs in parallel with default settings.

I attached today’s report of the visitor locations. Matomo and Google Analytics.

Matomo and Google Analytics report completely different visitor geo locations.

We know from the traffic we send to the test server that Google Analytics is more accurate about the geographic location of the visitor to the country.

What are we doing wrong? Settings at Matomo? Is Maxmind’s GeoLite2 database so bad?

Matomo:

The free version of the GeoIP 2 database is not that precise, that is mostlikely the problem.

But just to be sure, you do not anonmyze the ip before doing geolocation in Matomo?

1 Like

The free GeoIP database was always very accurate in terms of visitors country.

This is something new for now.

BTW no visitor anonymization active.

I noticed the same thing! I am using a commercial version of MaxMind Database (MMDB file), and there are huge differences between what MaxMind is saying and how it looks in Google Analytics.

Has anyone found a solution? Any hints?

For example, these requests are 100% from France when using MaxMind, but GA shows it like this:

1 Like

Did you find a solution? Did you switch back to GA?

Nope, no solution for that. I was forced to write my own software solution using Google Analytics Live API and some PhantomJS + PHP + MySQL backend. Took a while. Right now i can check any IP as long as i can send traffic from it. No idea how to check IPs that i don’t control.

1 Like

Interesting, thanks for your reply. I am using Maxmind GeoLite country database which shows a lot of incorrect country entries. It’s a pity. Just curious how good Maxmind commercial version behaves against GA

Google’s location is based on a kind of anycast mechanics.

An IP database is another approach that is not comparable.

I would prefer anycast mechanics in the first place, before I enrich that with an IP database.

As far as I know, Google Analytics has no public Geo-Location-API(Any updates?).

Cloudflares “HTTP_CF_IPCOUNTRY” HTTP header is a possible anycast based source, but unfortunately my Matomo installations never made it. Except in the preview of the location provider - see screenshot. If I activate the cloudflare provider, then the geo-location is suddenly all “USA”.

Hi,

If you have an issue with the cloudflare plugin, the easiest thing is probably to contact the author: