Support Topics Documentation Slack YouTube Blog

Analytics Returning Users update with lastLogin User attribute

I am trying to benefit from the number of Returning Users under Analytics in Backendless Console.

I am currently using stayLoggedIn to keep users logged in after they exit the app. This is resulting in not having the lastLogin value updated, and ultimately the Returning Users number stays unless a User logs out and logs in again.

I was advised to manually update the lastLogin value by setting it in the JS SDK as follows:
user.lastLogin = new Date();
update(user);

The update call is being successful, but the lastLogin value is not being updated.

Please advise.

Hello @karim-wazzan,

Returning Users is not about changing the lastLogin value. It’s not possible, but even if it would, it does not affect analytics. Only login/logout can be reflected in analytics.
If we consider the login with stayLoggedIn as one login, then we cannot say that the user returned. He continued his session, but a little later.
For example, if you take a user who went to some site, logged in there, switched to another tab, then returned to the one where he was logged in, then should it be considered that he came back again? I think no.
The whole question is in the duration of the session, for stayLoggedIn it is usually just longer.

Regards,
Stanislaw