Created
November 29, 2024 19:29
-
-
Save eyaltrabelsi/cbf9256b1ae16ac8528efe0c9d18e817 to your computer and use it in GitHub Desktop.
personalized_dashboard_tracking_interaction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if "user_interactions" not in st.session_state: | |
st.session_state.user_interactions = defaultdict(lambda: defaultdict(int)) | |
def track_interaction(user_id, item_name): | |
st.session_state.user_interactions[user_id][item_name] += 1 | |
track_interaction(user_id, selected_dashboard) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment