Update usage metrics: Track app engagement
Create a module that adds tracking for app engagement.
At the moment we only log when the app loads. So if a user keeps the app open it will never log again.
The idea here is to log whenever a user comes back to the e.g. switches back to the app tab or brings their browser back into view. We want to know if or to what extend the app is actually used.
This metric is probably going to be replaced by something more elaborate in the future, but we have to start somewhere :)
What to do?
-
Add a module that provides an RccUsageLoggingJob
(provideRccUsageLoggingJob()
) tracking app engagement.-
.tick$ should track whenever the app comes into or out of view (when started or when focus or on visibility change, is there more?), - FixedLoggingData:
-
.category: 'engagement' -
.key: 'focus' -
.userId: 'none' -
requiresConsent: false
-
- DynamicLoggingData
-
extraValue: 'in' when the app gets focus, 'out' when it loses focus
-
-
-
Add to both PAT and HCP
As we do not send any ID, I consider this to be anonymous, so we do not need consent. What do you think?
To track if the app comes in or out of view, try the visibilitychange event.
Label:
(en) In/out of view
(de) In/aus dem Blickfeld
Description:
(en) We count whenever the app comes into view resp. goes out of view. We use this data to determine how frequently the app is used in general.
(de) Wir zählen, wann immer die App ins Blickfeld kommt bzw. aus dem Blickfeld verschwindet. Anhand dieser Daten ermitteln wir, wie häufig die App insgesamt genutzt wird.
As always: Better Text is welcome :D