Hello fellow developers!<p>I am currently engrossed in the development of a new feature for my app, [Typogram](https://typogram.co), that aims to support anonymous user sessions of the app. I’m at a crossroads and could use some wisdom.<p>Quick background:<p>- For authentication and data storage, I use Firebase.<p>- Upon account creation, user data automatically finds its home in Firestore.<p>- I've also implemented local IndexedDB storage which is for offline usage and the storage of bulky data
chunks like undo/redo history that are not cloud-bound.<p>So, here lies the fork in the road: *Should I implement anonymous user sessions using Firebase anonymous accounts or should I lean on the local IndexedDB?*<p>*Firebase Anonymous Accounts*<p>- Operates much like a full-fledged account except no user information.<p>- User data would be stored in Firestore as usual, that comes with its own set of fees.<p>- ChatGPT says the Firebase anonymous session ends when browser closes, which is not ideal.<p>*Local IndexedDB*<p>- This route is financially free, storing user data locally in the user’s browser.<p>- I already laid the groundwork prior, so development time is shorter.<p>- The data is persistent even when browser is closed and reopened<p>Firebase tips the scale when it comes to data insights, offering a clearer perspective on the number of anonymous users and allowing for a nuanced tracking of their behaviors. But, it’s important to mention that to harness this, a decent investment of development time is necessary.<p>I’m eager to hear your valuable opinions, experiences, or insights on choosing the most effective path. Your input will be immensely helpful in navigating this decision!<p>Thank you in advance!
Sounds like a no-brainer for IndexedDB since it's free and gets you the persistence you want. In terms of visibility, it shouldn't be to difficult to add some telemetry regarding anonymous users that you could cache and push to Firebase periodically.