Collecting server logs doesn't work if you host your website behind Cloudflare or another CDN.
You can setup some sort of pixel that's never cached and that transmits the page via query params, but then the implementation isn't reliable and a PITA.
If you have your own server, something like Matomo.org works better.