# Get User / Session Id

**URL:** <https://discuss.streamlit.io/t/get-user-session-id/50514>\
**Category:** Using Streamlit\
**Created:** [August 31, 2023, 12:13pm UTC](https://discuss.streamlit.io/t/get-user-session-id/50514 "2023-08-31T12:13:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tonykip](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/tonykip/32/45167_2.png) [@tonykip](https://discuss.streamlit.io/u/tonykip)\
**Post date:** [August 31, 2023, 2:46pm UTC](https://discuss.streamlit.io/t/get-user-session-id/50514/2 "2023-08-31T14:46:27Z")

</div>

Hi @pierrelouisbescond,

Thanks for posting!

Streamlit does not have an API like `st.user_id` but you could use other workaround methods to achieve your goal. You could connect your app to Google Analytics and get some logs that way. This [thread](https://discuss.streamlit.io/t/how-to-add-google-analytics-or-js-code-in-a-streamlit-app/1610/38) would be a great place to start implementing some of the solutions.  
Here’s [another approach on StackOverflow](https://stackoverflow.com/questions/75410059/how-to-log-user-activity-in-a-streamlit-app).

---

_[View the full topic](https://discuss.streamlit.io/t/get-user-session-id/50514)._
