Setting up session replay tools (e.g.: Logrocket, Hotjar, Mouseflow, etc.) for streamlit app

Hi everyone! I recently launched my streamlit app and now want to capture user behaviour (analytics,clicks, etc.). However, I’m having a tough time implementing Logrocket in my streamlit app. Has anyone successfully set up a session replay tool for their streamlit app? Would be great if you could share the steps!

1 Like

Hey! I don’t know much about streamlit, but since it’s a web app, Mouseflow should be able to work with it.
Could you please write an email to support at mouseflow.com, they should be able to help.

1 Like

Hi Alex. Quite a coincidence! I had reached out to your team yesterday. Maria from your team informed me few hours back that Mouseflow will not be compatible with Streamlit though.

1 Like

Cloud you solve this issue?

I found out that you can use Microsoft Clarity for the user interaction. From there one can extract the time the user as spend in a page and the amount of clicks.
I suggest you put it like this in your html component:

            html_main= f"""
            <body style="position: relative;">
            {clarity_html}<p style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;"></p>
            
            # rest of the code you want to track.
            <style="border: none; outline:none; overflow:hidden; position: absolute; top: 0; left: 0; z-index: 2;" scrolling="no"></>
            </body>
            """

            components.html(html_main, width=None, height=height, scrolling=False)

I am using iframes - and clarity is not able to grab the iframe information, but I believe with another type of page it can do it. Give me some feedback if it worked.

If you found out the solution, please share :slight_smile:

1 Like

I’ll try this out in a few weeks, thanks!

Nope, yet to find a solution - Will surely update you.

1 Like

Well I found out a post that can help you out, I still didn’t test it, but it is here:

1 Like

Well, the thing is - google Analytics DOES NOT allow you to ‘video’ record user sessions; it may help capture certain KPIs such as click-rates, etc. ‘Session Replay Tools’ essentially capture video recordings of user sessions - so, you can observe their mouse movement behaviour, clicks, typing behaviour, etc. Thus, it gives more insights into the user’s interaction with your apps UX/UI

1 Like

Hi, did you guys figure out how to implement any session replay tool?

1 Like

Nope. Yet to find a solution

1 Like