Nginx reverse proxy traffic monitoring


We use Nginx reverse proxy to front end for our websites

Our requirement is to monitor the traffic passing through Nginx reverse proxy.

We have added Matomo script to the websites as they pass through Nginx reverse proxy so we can see the traffic from user desktop, mobile, etc… This makes the assumption that the website users has not switched cookies off.

I would like to remove Motomo script and use the data from the Nginx logs.

I understand from Matomo documentation how this can be set up.

My question; I see there is a configuration of Matomo to run on Nginx. Does this version of Matomo collect data from Nginx or is it just a Matomo running in Nginx services?