We’re building a software tracking app that users can use on their landers to monitor traffic sources and performance for their funnels.
We discussed the possibility of having a collection for each user of the app or making a 1 data collection that contains the data of all users. Our main concerns are the following:
If we make a collection for each user, organizing the data will be better since this collection will have the statistics for each day of the month. The user can query the statistics of a range, specific day, or year, but that way, we need to create many collections if have a large number of users.
If we make 1 collection that contains the user statistics, then we will have all the users’ data in 1 collection, and in order to query something specifically for the user, we have to do heavier queries each time, and the data will not be organized per user.
Accordingly, what is the best model to have this type of functionality, especially since we need data filters according to a time range for a specific user and domain, and we need to store user information, tokens, domains, etc.
I was thinking that having a collection for each user is the best option we have, so we can have a user info document, and a document for the page statistics on each day of the month.
Pls, let us know what do think. and what recommendations or special ideas you have for us as starters.
Thanks a lot!