PageViewLens

Self-hosted web analytics

Know your traffic. Keep no cookies.

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.

  • No cookies
  • No stored IPs
  • PHP 8.2+ and SQLite
  • Tracker: 2,920 bytes gzipped
example.com · Last 30 days · vs. previous period7 online now
Visitors
1,284+12.4%
Pageviews
3,071+9.8%
Bounce
41.7%-3.2 pts
Duration
2m 14s+18s
  • Search512
  • Direct298
  • AI211
  • Social119
Illustration of the dashboard with sample data, not a live site.

How it counts

Honest numbers,
no profiles.

PageViewLens answers how many people came, from where, and what they did. It deliberately cannot tell you who they were.

  • 01

    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.

  • 02

    No IP addresses stored

    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.

  • 03

    Signals respected

    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

Everything a site owner asks,
on one screen.

Visitors, pageviews, bounce and duration with a comparison to the previous period. Pages, sources, countries, browsers, systems and devices, all filterable.

  • AI as its own channel

    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.

  • Events without code

    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 and journeys

    Goals on pages or events, with prefix matching such as /blog/*. User journeys show the paths people actually take through the site.

  • Realtime

    Who is on the site right now and which pages they are reading. Polling pauses while the tab is in the background.

  • Sessions that mean something

    A session ends after 30 minutes of inactivity. A bounce is one pageview with no interaction. Time zones and calendar periods follow your configuration.

  • Your data, exportable

    CSV export of every report. The database is a single SQLite file you can copy, back up and query yourself.


How it works

Upload a file.
Add one script tag.

No build step, no container, no separate database server. If your host runs PHP 8.2, it runs PageViewLens.

  1. Uploadpageviewlens.php, pvl.js, .htaccess and assets/ to your web space.
  2. ConfigurePoint pvl-config.php at a database path outside the web root and create your login on the command line.
  3. EmbedAdd the site in the dashboard and paste the snippet before </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>
Tracking snippet and optional event attributes

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

The lightest way
to own your analytics.

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.

ToolSelf-hosting needsCookies by defaultWhere the data lives
PageViewLensPHP 8.2 + SQLite (shared hosting)NoneOne SQLite file on your server
Plausible CEElixir, PostgreSQL, ClickHouse (Docker)NoneYour server
UmamiNode.js and PostgreSQLNoneYour server
MatomoPHP and MySQL/MariaDBYes, can be disabledYour server
Google Analytics 4Not self-hostableYesGoogle

Questions

Frequently asked
questions.

What is PageViewLens?

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.

Does PageViewLens use cookies?

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.

Do I need a cookie banner for PageViewLens?

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.

What hosting does PageViewLens need?

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.

How is PageViewLens different from Google Analytics, Plausible, Umami or Matomo?

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.

Can PageViewLens show traffic from ChatGPT and other AI assistants?

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.

Does PageViewLens count bots?

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.

How do I get PageViewLens?

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.

How long does PageViewLens keep data?

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

Analytics you can
put in a privacy notice.

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.