In the Progressive Web App there are situations where you want to enable your visitors to interact with the application and do things that require tracking data before you force them to create an account.
How in this situation are you managing the state of the application for that user before he/she is logged in? I ended up using @karimoo’s dummy user trick proposed here which works but has the undesirable side effect of creating a dummy user record for every anonymous visitor to the homepage of the application. This ends up yielding a haystack of 95% garbage records in the User collection.
I looked into doing a periodic purge of any dummy user records on the User collection but that then has its own negative consequence which I learned later which is that the app then hangs indefinitely on the redirect screen for anyone who had previously visited anonymously but subsequently had their dummy user record deleted. They would have to clear their cookies to regain access to the app.
Just curious how others are handling this issue. AFAIK there is no such thing as session or client variables one can set to manage user actions & preferences prior to them becoming a registered user. Has anyone solved this in a more elegant way than the dummy user approach or are you just accepting that the User collection will always be 95% cruft? thanks