Nothing on the device
No cookies, no localStorage identifiers, no fingerprinting. A visitor is a hash of a random daily salt, the site, the IP address and the user agent. The salt is deleted when the day ends.
Self-hosted web analytics
PageViewLens is cookieless web analytics in one PHP file and one SQLite database. It runs on the hosting you already pay for, stores no IP addresses, and the numbers never leave your server.
How it counts
PageViewLens answers how many people came, from where, and what they did. It deliberately cannot tell you who they were.
No cookies, no localStorage identifiers, no fingerprinting. A visitor is a hash of a random daily salt, the site, the IP address and the user agent. The salt is deleted when the day ends.
The IP is used once to build the hash and, if available, the country code. Paths are stored without query strings, referrers as host names only. Raw data is deleted after 13 months.
Do Not Track and Global Privacy Control switch tracking off. Bots, headless browsers and automated browsers are dropped before anything is written. You exclude yourself with ?pvl_ignore=1.
What you see
Visitors, pageviews, bounce and duration with a comparison to the previous period. Pages, sources, countries, browsers, systems and devices, all filterable.
Traffic is grouped into AI, Search, Social, Email, Referral and Direct. Visits from ChatGPT, Perplexity, Claude, Gemini and Copilot are counted as AI, including ChatGPT links that only carry utm_source.
Outbound links, downloads, in-page anchors and buttons are recorded automatically. Name the ones that matter with data-pvl for clicks or data-pvl-view for elements that became visible.
Goals on pages or events, with prefix matching such as /blog/*. User journeys show the paths people actually take through the site.
Who is on the site right now and which pages they are reading. Polling pauses while the tab is in the background.
A session ends after 30 minutes of inactivity. A bounce is one pageview with no interaction. Time zones and calendar periods follow your configuration.
CSV export of every report. The database is a single SQLite file you can copy, back up and query yourself.
How it works
No build step, no container, no separate database server. If your host runs PHP 8.2, it runs PageViewLens.
pageviewlens.php, pvl.js, .htaccess and assets/ to your web space.pvl-config.php at a database path outside the web root and create your login on the command line.</body>. Single-page apps are tracked through pushState.<!-- the whole integration -->
<script src="https://stats.example.com/pvl.js"
data-endpoint="https://stats.example.com/pageviewlens.php"
data-token="SITE_TOKEN" async></script>
<!-- optional: name what matters -->
<a href="/pricing" data-pvl="pricing_click">Pricing</a>
<p data-pvl-view="lead_sent">Thanks, we got it.</p>
Hardened by default: the database lives outside the web root, the dashboard runs under a strict Content Security Policy, logins are rate limited, and a missing database stops the app instead of creating an empty one.
Compared
Plausible and Umami are good cookieless tools. Self-hosting them means running a stack. PageViewLens is for when you only have PHP hosting and want the data on it.
| Tool | Self-hosting needs | Cookies by default | Where the data lives |
|---|---|---|---|
| PageViewLens | PHP 8.2 + SQLite (shared hosting) | None | One SQLite file on your server |
| Plausible CE | Elixir, PostgreSQL, ClickHouse (Docker) | None | Your server |
| Umami | Node.js and PostgreSQL | None | Your server |
| Matomo | PHP and MySQL/MariaDB | Yes, can be disabled | Your server |
| Google Analytics 4 | Not self-hostable | Yes |
Questions
PageViewLens is self-hosted web analytics built by Marc Hildmann. The tracker, the dashboard and the API live in one PHP file and write to one SQLite database. It counts pageviews, visitors, sessions, sources and events without cookies and without storing IP addresses.
No. PageViewLens sets no cookies and stores nothing in the visitor's browser. A visitor is identified only for one day by a hash of a random daily salt, the site, the IP address and the user agent. The salt is deleted after the day ends, so hashes cannot be linked across days or sites, and the IP address itself is never written to the database.
PageViewLens is designed so that no information is stored on or read from the visitor's device, which is what triggers the consent requirement for cookies in the EU. You still need to describe the processing in your privacy notice. This is a technical description, not legal advice.
Any web server with PHP 8.2 or newer and the pdo_sqlite extension, which ordinary shared hosting provides. There is no Node.js, no Docker, no separate database server and no Composer. Countries are resolved if the PHP geoip extension is available.
Google Analytics sends data to Google and needs consent. Plausible and Umami are cookieless too, but self-hosting them needs Node.js or Elixir with PostgreSQL or ClickHouse, usually in Docker. Matomo runs on PHP but needs MySQL and uses cookies by default. PageViewLens runs on plain PHP hosting with SQLite and is cookieless from the start.
Yes. Visits are grouped into the channels AI, Search, Social, Email, Referral and Direct by the referrer of the first page. Referrers such as chatgpt.com, perplexity.ai, claude.ai, Gemini and Copilot count as AI, and utm_source is read when no referrer is sent, which is how ChatGPT links often arrive.
No. Known bot user agents, headless browsers and automated browsers that report navigator.webdriver are dropped before anything is stored. Because tracking runs in JavaScript, crawlers that do not execute scripts never reach it.
PageViewLens is available on request, as a service. There is no public download and no self-service signup. Marc Hildmann sets it up on your PHP hosting and configures your sites, goals and events with you. Scope and price are agreed per request through the contact form on marchildmann.com.
Raw pageviews and events are deleted after 13 months. Paths are stored without query strings, referrers only as host names and countries only as ISO codes.
Available on request
PageViewLens is built and maintained by Marc Hildmann, an independent software engineer near Hannover, Germany. PageViewLens is a service on request: Marc sets it up on your hosting and configures it with you.