akvo / akvo-flow-services

Akvo Flow service applications for reporting, bulk uploads and others
Other
4 stars 1 forks source link

Add Webforms submissions to stats csv file #315

Closed janagombitova closed 2 years ago

janagombitova commented 3 years ago

Currently we generate a data file every day that holds the individual instance and the total number of users, devices, surveys, device files, submissions per each instance. This file is used to track the usage of partners as well as other product stats.

As part of the Cisco grant we are focusing on enhancing remote data collection options, one of which are webforms. We track the number of submissions via webforms. Besides seeing the total number of webforms submitted till date it is interesting to also know which Flow instance the submissions are made to so we can understand if webforms are utilised across all our partners or only across TechSolutions projects.

Would it be possible to add another column to this daily csv file that shows the number of submissions per instance from webforms?

iperdomo commented 3 years ago

Would it be possible to add another column to this daily csv file that shows the number of submissions per instance from webforms?

Impossible is nothing™

The current stats uses some Datastore stats to get those numbers. The code needs to be adapted to query the counts where the Form Instance (aka SurveyInstance) device is "Akvo Flow Web". We have some sample code in a different repository: https://github.com/akvo/akvo-flow-stats/blob/29b23e2472f57c70fcc5dfa48554bb8bd43dd872/src/main.clj#L46-L51

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.