Runlight is open source web analytics that keeps every number in your own database. It counts visitors, pages, sources, places, devices, campaigns, and conversions without cookies and without keeping anything that could say who a visitor was. It sets no cookies and stores nothing on the visitor's device.
Activate the plugin and choose to run Runlight inside WordPress, with nothing else to set up:
- It adds Runlight's script (under 2 KB gzipped) to every page, and marks 404 pages so broken links show up.
- It leaves out administrators' own visits, if you want.
- It records AI agents such as ChatGPT, Claude, and Perplexity when they fetch your pages to answer someone's question, and crawlers such as GPTBot and ClaudeBot. They run no JavaScript, so no script can see them; the plugin records them on the server, after the page has been sent. A fetch from an address the agent's company publishes shows under the agent's name, and any other shows as claimed.
- The Runlight item in the admin menu shows this site's numbers in wp-admin, and the full dashboard opens at /runlight on your site, for anyone who can manage options.
- Goals, funnels, short links, email reports, and imports from Umami, Bitly, and other services are all in the dashboard.
The numbers stay in this site's database: in Runlight's own tables, named after WordPress's table prefix (such as wp_runlight_events), when the database is MySQL 8.0.20 or MariaDB 11.4 or later, or else in a SQLite file in the uploads folder. Each site in a network keeps a SQLite file of its own.
If you already run Runlight elsewhere, as the standalone server or inside an app, the plugin can send to that one instead. Press Connect in its settings and that Runlight fills them in, so one dashboard covers all your sites.
Privacy
The script sets no cookies and stores nothing in the visitor's browser. Runlight counts a visitor with a hash of a daily salt, your site, their IP address, and their user agent; the address and the user agent are never stored, and the salt is deleted after its day is over and the last visit that began that day has ended, at the next visit or hourly check.
Source code
The plugin bundles Runlight's own PHP package, runlight/runlight (MIT), at vendor/runlight/runlight, as Composer lays it out, with its built scripts in vendor/runlight/runlight/assets. Their source, and the tools that build them, are at
github.com/runlightsh/runlight:
- vendor/runlight/runlight/src is the PHP package itself, from packages/php.
- vendor/runlight/runlight/assets/dashboard.js and dashboard.css are the dashboard, built from packages/dashboard.
- vendor/runlight/runlight/assets/tracker.js, picker.js, and pick-return.js are the tracking script, the goal picker, and the picker's relay page, built from packages/tracker.
- vendor/runlight/runlight/assets/world.json is the dashboard's world map: Natural Earth's 1:110m countries (public domain), by way of the world-atlas package, projected by packages/dashboard/scripts/world.mjs.
- composer.json names the package, as Composer would install it into vendor.
- The plugin's own assets/settings.js, assets/frame.js, and assets/dashboard.js are its source, not built.
Running npm install and then npm run build at the top of the repository builds every one of them and copies them into packages/php/assets.
- Install and activate the plugin. It opens its setup screen, and nothing is counted until you choose.
- Press "Run Runlight in this WordPress". Runlight starts counting this site.
- Open Runlight in the admin menu to see the numbers, or open /runlight on your site for the full dashboard.
To send to a Runlight you run elsewhere instead, choose "Connect to a Runlight you run elsewhere" on the setup screen, enter its address, and press Connect. That Runlight asks you to allow the connection for the site that counts this domain, or offers to add one when its sites are managed in its dashboard, as on the standalone server, and then sends you back with every setting filled in. Connecting needs wp-admin on https. You can also copy the settings by hand from that Runlight's Settings, Install, where they have the same names: Runlight address, Site id, Agents key, and Dashboard key.
Running Runlight inside WordPress needs PHP 8.2 or later with the mbstring and openssl extensions, and either WordPress's database on MySQL 8.0.20 or MariaDB 11.4 or later, which Runlight reaches through WordPress's own connection, or else PHP's sqlite3 extension. Each site in a network always uses a SQLite file, so a network needs sqlite3. The settings page says when something is missing.
With plain permalinks, Runlight answers at /index.php/runlight rather than /runlight, so it works on every server, and the settings page says so.