jrieke / streamlit-analytics

👀 Track & visualize user interactions with your streamlit app
MIT License
262 stars 48 forks source link

Issues with Session State #1

Closed oltipreka closed 2 years ago

oltipreka commented 3 years ago

Hi guys, First, congratulations for the great idea of creating an analytics tool for Streamlit.

I am having an issue when using Streamlit_analytics with a Login class for single user given as an argument within get_session_state

Is there any rule where to precisely include insert .start_tracking() and .stop_tracking() within a Streamlit app?

jrieke commented 3 years ago

Hey @oltipreka, thx for trying it out! Oh yeah it could be that this causes problems because streamlit-analytics uses session state to track widget interactions (and getting session state twice with different parameters is problematic). Could you post a short code snippet of how you use session state so I can see how to accomodate it?

Btw this is a super early prototype so please keep reporting if sth doesn't work ;)

jrieke commented 2 years ago

You can use Streamlit's official session state feature now, which shouldn't cause these problems. Closing.