-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix geolocation tracking by adding proper public ip address #8
base: main
Are you sure you want to change the base?
Conversation
The IP is usually coming from the server so it can just stay at the loopback address (127.0.0.1). In my production system this works without problems. |
Sorry but I'm really bad at networking, IPs and stuff like that, can you elaborate? |
So as I understand how Plausible works you don't need to tell Plausible your IP as the server itself takes it. |
What he says makes sense as Returning to your PR, I don't feel comfortable using only one service to get the IP. Maybe adding a fallback or something (e.g. ifconfig.co). |
Yeah, on my system, where I just use your plugin, it does not work without my changes. The country list and map are empty, unfortunately. |
Hi!
|
Do you have a reverse proxy in front of your Plausible instance? |
Yes of course, I'm using nginx and plausible installed over docker. I tried your code by downloading the git and commenting the header and it works like charm, if you have configured the Maxmind it also shows the cities. Actually I read in a different section if you want to properly identify unique users, this header should not be set as it is intended only to be used by backend services |
In case it is useful my code is as follow
I could create a PR |
As far as I know, Flutter has no way of getting the public IP address of the device, which is needed for geolocation to work (map in plausible dashboard).
I used the most common API for that.