Closed madsem closed 6 years ago
If you are using the Server module GeoIP location provider, the location data won't be available when using the tracker proxy. You may need to switch to PECL or PHP based detections.
Thank you for this info, this is indeed the case. Sounds more like a bug to me though tbh?
I'm using it as NGINX module, GeoIP2.
It is def. available, Matomo just doesn't use it. I even mapped the $_SERVER vars to the ones Matomo uses internally.
It's not a bug. It's simply not possible to determine the location in this case. The proxy sends a new request for tracking to Piwik. This request is sent with the IP of the server (in header). As the Apache or Nginx module uses the IP in header to determine the location, it is incorrect/impossible in this case.
Btw. We are currently working on GeoIP2 implementation for Piwik...
okay bug was not correct, meant it more like a design flaw maybe. It's still possible to override the remote_addr and get results that way for example.
But your answer makes sense, and good to know you're working on GeoIP2 also. Thanks!
Spoofing the senders IP address might not be something that should be done for HTTP requests.
Btw. It might not be good to use GeoIP2 server modules with Piwik already. GeoIP Legacy and GeoIP2 uses different codes for regions (FIPS vs ISO). Currently Piwik is only able to handle the old ISO codes. Using GeoIP2 already might result in incorrect region data after GeoIP2 support is introduced in Piwik.
You're right Stefan. Just maybe also depends on the use case, just my opinion so that functionality doesn't break like in this case. Problem here is, our servers are set up this way, changing that would require a lot of work.
Thanks for the tip regarding regions, have to think how to solve this now. Need more coffee :)
Since I switched to this proxy, providers and countries are all tracked as unknown. Without using the tracker prxy it's working.
What is the issue here?
PS: added image in comments, as you can see IPs are tracked, browsers too (browser language also 90% missing)
Integrated the tracking proxy step by step as described, also added user with admin rights.
But country, provider data and browser language are missing to over 90%