Detect first use of app each day


#1

I’m trying to establish if it’s the first time a user has launched the app on a daily basis to show a one off message each time.

Is there a sensible way of doing this that perhaps uses the user account data?

I’m using ostrio’s user-status package, but for some reason my accounts are missing the lastActive value. I’m not sure that would be particularly helpful anyway.


#2

You could store the Date once Meteor.startup(() => { … } ) has been run in the users profile and, in the startup check if the previous Date is greater than 24 hours of the current Date.


#3

On user login, get current day and compare it with the day of his last visit ? If current day > last visit, display the message and save current day into user details as his last visit.