I have setup GeoIP in a Matomo instance, but the Country is not showing India or any other except US. Also Region & City are not recognized and shown as unknown always. Due to this issue, real time map is not getting loaded.
The Matomo server is running from a private LAN and with special access, it can be accessed from public internet for testing purposes.
I have done the following changes in an attempt to fix the issue:
Made config changes for Matomo Apache server to allow the SVG file format to be sent for Location tracking.
Setup Apache GeoIP 2 but ended up getting the error The MM_COUNTRY_CODE $_SERVER variable is not set. Your server may not be configured correctly., even though I had downloaded the free City and Country DBs from MaxMind and specified it in the configuration file.
Kindly provide your valuable comments to solve this issue.
So all IPs received by the server are considered as internal, isn’t it? When an internal IP is received by Matomo, it uses the browser language to determine the country, en-US in your case… In your cae, you disabled this feature…
Just checked. And it is not fetching the intended IP.
What is my IP site shows the IP address as: 165.225.XXX.XXX
while Matomo shows the IP address in Visitor Log as: 192.168.XXX.XXX.
Why is there an inconsistency?
Also, Checked out the Privacy Settings configuration. They are in the same way as mentioned.
The GeoIP 2 for Apache is broken and the error displayed was given in the first post in this topic.
I am using the Matomo tracker in JavaScript code (using _paq.push(...)).
This seems to use API tracking, which is different from what I am using. Also, using Admin token, which exposes threat to security (can be identified from Network tab of Developer Console).
Yes.
I was saying that when I use the tracker code via JavaScript (using _paq.push(...)) the tracking happens, but the location is not being identified accurately.