How to see how many views a document or image has?

Just a simple question, how do I see how many times and by who one of my documents that I have shared has been viewed? I imagine that users can see certain statistics regarding their shared content, however, if only the administrator has such privileges, then please tell me how to do so. I am also the admin. Thanks

1 Like

This sort of information is written to the “audit.log” file, located in the data directory. You do have to configure logging. Amongst other information written to this log file, you can find entries showing when something happened, what happened, and the user who originated the action.
In your case you would be looking for entries where the “message” key starts with “file accessed”.
Alternatively, you could use Splunk and the “Splunk App for Nextcloud” which visualises exactly this type of information in dashboards. This latter option is only relevant if you are really interested in what your Nextcloud server is doing or if you are an enterprise.
For more, see here:

Thank you for your answer. I am not interested in what my users are doing, I’m only interested in following who views MY shared documents and how many times. Its unfortunate that Nextcloud doesn’t give this capability to all users as it is important for statistical reasons to many users, and is offered by many competing services.

Anyway, I configured audit.log to “1” and checked it out and found a list of dictionaries which do contain the info I’m looking for. However, the info needs organization and parsing. Is there a Nextcloud app that processes this info in the GUI (such as the now abandoned “activity log” app) or do I have to write my own script that runs as a separate process on my server and must be accessed manually?

My server is for personal use, so yeah, something like Splunk or OpenMNS is a bit of overkill. I am looking for something like what the activity log app used be.