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

[BUG] streamlit-analytics cannot track multi-page separately #47

Open
Joyce920hope opened this issue Mar 8, 2024 · 5 comments
Open
Assignees
Labels
bug Something isn't working future release The issue will be fixed in a future release

Comments

@Joyce920hope
Copy link

Joyce920hope commented Mar 8, 2024

I have 2 pages in my application, and I'm tracking both the page views and st.sidebar.file_uploader for each page. On page1, the number of page_view and the number of uploaded_file is only for page 1, which is as expected. However for page2, the number of page_view and the number of uploaded_file are not only of page2, but also combined with these two metrics of page1. Any idea why that maybe happening? Thank you.

@Joyce920hope Joyce920hope added the bug Something isn't working label Mar 8, 2024
@Joyce920hope Joyce920hope changed the title [BUG] [BUG] streamlit-analytics cannot track multi-page separately? Mar 8, 2024
@Joyce920hope Joyce920hope changed the title [BUG] streamlit-analytics cannot track multi-page separately? [BUG] streamlit-analytics cannot track multi-page separately Mar 8, 2024
@444B
Copy link
Owner

444B commented Mar 9, 2024

@Joyce920hope Thank you for raising this issue!
I believe this is is within the current limitations of streamlit_analytics2

Can you try add a tracking to the other pages and let me know if that works?
I think it might since it will still increment session state

@444B
Copy link
Owner

444B commented Mar 9, 2024

Oh hang on, I understand that you want to see the metrics for each page separately... Yes, that would be happening since both calls to streamlit_analytics on each page is going to contribute to the session state as a whole.

@444B 444B added the future release The issue will be fixed in a future release label Mar 11, 2024
@Joyce920hope
Copy link
Author

@444B Yeah, I believe this is the limitation of the package. Thanks for your explanation. And thank you for taking the action! If you got any update on the issue, please let me know!

@444B
Copy link
Owner

444B commented Jun 29, 2024

Related issue #100

@alon-sht
Copy link

Do you belive this issue will be solved sometimes soon?
This would be awesome
I tried playing with it by calling reset_counts() within strart_tracking()
This indeed sepeareted the info from the pages, but it resets the counts every refresh...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working future release The issue will be fixed in a future release
Projects
None yet
Development

No branches or pull requests

3 participants