Skip to content
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

After being forwarded by nginx, the Daily Users data display error #1

Open
iGmainC opened this issue Sep 5, 2023 · 4 comments
Open

Comments

@iGmainC
Copy link

iGmainC commented Sep 5, 2023

In actual use, I need to use nginx to forward requests to port 80 of the container (because of https), but I found that the Daily Users data is always 1, and the Countries data are all Unknown.

What should I do?

PS: This is a great open source project.

@goenning
Copy link
Member

goenning commented Sep 5, 2023

That’s probably because the Client IP the container is seeing is from Nginx instead of the actual client ip.

can you try to forward the actual client IP under this header name “ CloudFront-Viewer-Address” to see if the result is better?

If that works we could add support for a more standard header name too, I use this one because I run on AWS

@iGmainC
Copy link
Author

iGmainC commented Sep 6, 2023

That’s probably because the Client IP the container is seeing is from Nginx instead of the actual client ip.

can you try to forward the actual client IP under this header name “ CloudFront-Viewer-Address” to see if the result is better?

If that works we could add support for a more standard header name too, I use this one because I run on AWS

First of all thanks for your reply.
I added proxy_set_header CloudFront-Viewer-Address $remote_addr; in nginx configuration file.
The country looks right, but the DAU data still doesn't look right.
I would like to ask what rules are used to count daily active users?

@goenning
Copy link
Member

goenning commented Sep 6, 2023

The user identification is basically SHA(ip address + user agent + daily rotating salt)

What makes you think the DAU is incorrect ? What SDK is your app using?

@iGmainC
Copy link
Author

iGmainC commented Sep 7, 2023

The user identification is basically SHA(ip address + user agent + daily rotating salt)

What makes you think the DAU is incorrect ? What SDK is your app using?

Because I have another solution to calculate the number of daily active users, and the statistical results of the other solution are about twice the results of aptabase. I guess it may be due to the wrong ip statistics before, or it is possible that some users have the same egress ip.

I am using tauri sdk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants