Umami
Collecting traffic data without handing it to an ad network is the whole idea behind this privacy-friendly analytics platform, which reports pageviews and visitors through a simple tracking script and a server you host. It covers the common web analytics ground with referrers, custom events, goals, funnels and revenue, plus a dashboard you can share with a team.
Site owners use it to see how many people visit a page and where they arrive from, without handing visitor data to a large analytics company.
Hosting the server yourself keeps the traffic data on your own infrastructure, removes plan limits and per-event fees, and the database fits your existing backup routine.