As far as how I go about doing this, I track logins using, guess what, logs
Each time a person logs in, a new thing in the database is created (call it ‘log’) and in this log I’m keeping track of the user account, IP, browser data, type of log, etc. This log is then attached to the user (new column on the ‘user’ type, call it ‘logs’ and that becomes a list of log[in] records). Once this process is in place, you can reference the logs for any purpose which is pretty handy.
Now, while you could ‘do a search’ for these log entries upon each person logging in to check if one exists, that might eat up a bunch of server resources. I recommend creating a new column on the ‘user’ called ‘last logged in’ and set it as a ‘date’ type. On each login, update this field with the current datetime. If the field is empty, you can trigger a specific event since you can assume it’s their first time logging in and trigger your custom workflow. This doesn’t have to be a date field, you could alternatively create a yes/no boolean called ‘first time logging in’ which would be set to ‘yes’ by default and when users login for the first time, set this to ‘no’.
As for what you can do if you decide to start tracking logs, anything you can imagine using login data is now possible:
Maybe you want to send a friendly reminder email to everyone who hasn’t logged in recently: you can extrapolate the log data and return a search for all users that haven’t logged in at all, in the last 7 days, 30 days, etc.
Define cohorts of users based on their browser type, screen size, login patterns (frequent use during certain times of day?) in order to improve UX and decide on UI changes. This kind of stuff is more useful at scale, but if you don’t record data now, you likely won’t for a long time or until it’s too late. Mixpanel could be used here too, but that comes at a cost and if you retain your data in Bubble you have more control over it.
Last but not least, one other way I’ve used login data is to alert people when a login was detected at an unusual IP address. You can also prevent multiple logins to 1 account from multiple IPs at the same time.
I probably said too much here, hope I’ve been of some help!