I need to have an analytics of my Realtime Database, such as: count of users, count of active users (field dateLastVisit
in user profile is no later than a week) and so on. How can I do this? Currently I can find how to use analytics for only apps.
Asked
Active
Viewed 1,297 times
1

Frank van Puffelen
- 565,676
- 79
- 828
- 807

Konstantin Konopko
- 5,229
- 4
- 36
- 62
1 Answers
1
Such metadata is not available for the Firebase Realtime Database, nor is Google Analytics for Firebase aware of access to the database. But if you fire Analytics events from your app when you access the database, you can probably accomplish the same. Or alternatively, you could simply store the data in the database and query it there.

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
Frank, tell me please how can I get count if child nodes in Functions without of getting them all (do not load data)? Now I have cron jobs and I guess I could implement this. – Konstantin Konopko Apr 04 '18 at 14:47
-
The Firebase Database doesn't support aggregation queries. If you want to know a count, you'll either have to read all relevant nodes or keep a separate counter. – Frank van Puffelen Apr 04 '18 at 15:29
-
Frank, could you clarify analytics logic: now I can't see log events in my dashboard, may be the reason is my app running in debug mode? – Konstantin Konopko Apr 10 '18 at 13:36