Also, it might be worth looking for analytics software that can get its data from web server log files. I have done that with Apache and Nginx in the past. These days, I wouldn't be surprised if such software can ingest the log files created by Amazon's S3 free tier. You wouldn't have to manage a VPS with that approach.
Of course, if you're letting a major data collector like Github (Microsoft), Amazon, or Cloudflare serve your site, it's not particularly good for privacy to begin with.