Forum Academy Marketplace Showcase Pricing Features

Tracking when users are active on site

Hi! We’re trying to track when users have been last active on our site. We have a lot of users in our db, and ideally we’d clean up ones that haven’t been active in a while (or at very least: archive them)

We’re thinking of adding a WF on each page load, that updates the user’s record with a LastVisited time field.

But we’re considering the operational parts of doing that. Would there be a better way?

Hey, bubble has a pretty good plugin that they’ve made to track user analytics, this should help point you in the right direction!
https://manual.bubble.io/core-resources/bubble-made-plugins/google-analytics

Your approach would work. Or if you wanted a record of all pages visited, set up a different datatype that stores the page name only. The user and the date will be entered automatically since they are built in fields.

You can also experiment with having this execute as a backend workflow on page load.

You can do this through Google Analytics. Beats implementing a custom solution.

I’m working something similar but more advanced should you decide you want more info than just page. If you wouldn’t mind liking my thread here, I’m getting a group of people together to solve.

Your current approach seems like a sensible and straight forward approach. That’s what I do on most of my apps also.

I typically add that workflow to a reusable element - such as a header - that’s on all of my pages so I only need to manage it in a single place, but I capture data from right across the app.

Regardless of the solution you use, if you want to track this at a user level (not anon) you’ll need to write this to the Bubble db on each event, so I don’t really see the point of using Google Analytics or other third-party solutions for this (particularly as they don’t load in all situations).


Josh @ Support Dept
Helping no-code founders get unstuck fast :rocket:save hours, & ship faster with an expert :man_technologist: on-demand

I post daily about no-code and Bubble on Twitter Follow Support Dept on Twitter

Hey @mm71593
We made a plugin that does exactly what you need, check this out: