Tracking users when they are already logged in

I would like to log in my database the current date/time every time a user logs in. This is easy in the WF on the actual log in, but how would you do this if the user bookmarks your site to the page that you are re-directed to upon logging in? If they stay logged in, but open the app the next day the WF to log the user wont be triggered. I would like to know if this is a new session for the user and log it. Any way to do this on the page load?

Try to use by lastlogon properties in the bubble when page is loaded workflow .

I don’t see this option. Where is it?

You mean when they log in or when they open the app/page? Those are different things and as you mentioned, users can stay logged in if you’ve enabled this so the data is not really helpful.

I’m using third parties like Hotjar and Tidiochat to keep track of users. I want to see specifically what they are doing so I can improve the UX. Another thing is to drive lead generation / signups.

I’m on a free plan for both but as for Tidio we are currently on a trial that allows me to track live visitors. I’ve altered the code a bit so each user shows up with their registered name. Hotjar allows me to record user sessions to see what they are doing in the app.

i use google analytics for a more meta analysis.

I also have a ‘last login’ field on the user but I mainly use it see if a user indeed logged in at least once. its not very useful to me otherwise.

So I guess it depends on your goals for tracking users. But there are a lot of third party tools that are very affordable and could solve a need.

Just add new field in the user table called “Lastlogon” datetime.

if your coming to our site from bookmark/directly entering website url in the browser - call workflow on “page is loaded” with “current user is logged in” property,
use below
lastlogon datetime < current datetime => put current datetime, otherwise leave it.

Yeah, but what if the page is refreshed or when there are multiple pages and users navigate back to the home page?

need to maintain browser cookie (page is loaded first time) by using html tag element on header page. so that we will easy to identify user is navigating or refresh.

or

use of element state when page is loaded first time