Had an ask today to start reporting on how users are using our app. If the user is creating data, this is pretty easy as long as we’ve added and are populating belongs-to user and created_at fields on our models which we have been. But what if the user is only viewing data and not adding anything new? We could update the app to set a “last_logged_in” time on the user whenever they hit the main view, but this would only capture data moving forward.
I checked the data model and found this on each user indicating every device they’ve enrolled in the app:
But these aren’t actually fields on our user model so I’m not sure how to access them. Is there a way to get at this information from a user object in the app? Specifically we’d want to iterate across the device data for each user.