Show which users are on (viewing) a page!?

Hope you’re all doing very well!

Has anyone figured out how to show which members are currently logged in AND viewing a page in your app?

In the circled red section, I want to do a Repeating Group of all users (images) who are actively logged in and viewing this event. Thoughts?

@ChefThomas Hello!

Add a field “last login” of type date to the user data type

In the login flow add the action “make changes to a thing”, choose “user”, choose “last login” and set it to current date/time

In your repeating group search for users whose last login is greater than than current date rounded down to day, and another constraint for last login to be less than current date change days +1 rounded down to day

The above should return those users thet have logged in today

You can set more checks like record a date/time when they log out.

2 Likes

@cmarchan thanks for your reply. However, that will not show me who is actively looking at a specific page.

Maybe I’m not explaining well.

Really looking for who is now, at this moment, has that specific page open.

I appreciate the insights - keep the ideas coming!

My best-

Rich

@ChefThomas

Create a “page visit” object

On each page place a flow to create one page visit with the name of the page and what user visited it … date … :+1:

2 Likes

that’s genius, and totally works. Thanks a LOT! I’ll post a video about the whole flow, soon. @cmarchan - awesome!

1 Like

@ChefThomas

Best of luck perfecting the functionality you need!

… a side note

This is the hundredth solution that great folks like you have privileged me with in this awesome forum. :smiley:

image

Thank you!

2 Likes

@cmarchan wow, that’s great! We all appreciate your commitment and I look forward to one day reaching the same milestone, too! Thanks :metal:

1 Like

Awesome solution @cmarchan !

BTW I was working on a very similar demo for my new plugin (it’s currently under review).

I will leave the Demo and the Editor here, if it could be helpful for someone or just for an inspiration.

5 Likes

Very cool!

1 Like

Thanks for beeing always so helpfull!

2 Likes

@cmarchan he is such a great guy. One of the best man here helping with solutions :sos:. Looking forward to working with you.

2 Likes

@cmarchan hmmm… I still 1 big challenge - how to identify when they leave :sweat_smile:. I’ve “Deleted a thing” representing when they entered if they click a link on the page that navigates them away from the page. BUT - I can’t do that for items in my header menu :confused:. open to your ideas!

@ChefThomas

You can use the event “do every 3 seconds” and set the action to record a “date/time - page exit” field of type date in the corresponding data type you chose to create to track a page visit.

Since it is important for your app to record user activity, I would be on the lookout for @BubbleSam ‘s new plugin described above. It looks interesting! :grinning:

And of course … I would be exploring third party services that provide this and other user data … Google Analytics, Intercom, Hotjar …

1 Like

@cmarchan you’re so great to help, thank you! I guess I’m confused on this one. Even if we do refresh every 3 seconds, and a record of the time is kept, it doesn’t mean we know what page the user is on (at least from what I’m seeing). And, I don’t want to use 3rd party trackers on my page. Would love to figure this out :sweat_smile:

Rich-

Hello @ChefThomas and thanks again for the kind comments!

You are setting the “do every seconds” action in the flows tab of the page right? … So, we know which page we are on!

Just record the name of the page in the most appropriate place where you are creating the entries to monitor user activity.

1 Like

Create an options set for the pages of your app

Example:

1 Like

@cmarchan i see what you mean! OK :metal:. is it better to do this in option sets than do it in my DB directly? For security… tracking users activity, etc. will it slow down app speed?

Options set would be one of the fields of your event object

They will not slow down app speed at all since they are part of the Bubble language and not a dB object (datatype) per say

1 Like

this seems like what I need to do :sweat_smile:

not that you didn’t already explain this @cmarchan - just that the way it’s explained to me here, my brain could wrap around easier I guess.

This topic was automatically closed after 70 days. New replies are no longer allowed.