UNPKG

@robotical/appv2-analytics-gatherer

Version:

A tool that gathers data from the Apps and sends it to the Analytics server

30 lines (21 loc) 1.32 kB
# Analytics project for the App V2. ## Repositories - **gatherer**: - Exposed to the webapp for data collection. - Sends data to the server. - Published as an npm package. - Maintains and publishes types for the raw data. - **server**: - Stores raw data in the `appv2-analytics-raw` Firestore database. - **processor**: - Runs every 24 hours. - Processes raw data. - Stores processed data in the `appv2-analytics-processed` Firestore database. - Maintains and publishes types for the processed data. - **viewer**: - Dashboard for displaying processed data. ## Types - Defined in the gatherer. - Published as a separate npm package (`appv2-analytics-types`) within the gatherer directory. ## Data Gathering It gather data as events with a log-only approach, meaning that it only logs events and does not edit them in any way. The data are as flat as possible and we do not use any nested data structures. To log time spent on screens/activities/sessions, we send a heartbeat even every so often with enought information to link that event to the appropriate session/activity/screen etc. A session starts as soon as a robot connects and goes up to when the user stops using the app. So in other words, we track app sessions but the onset is not an app visit, but a robot connection.