![]()
Barelytics is a self-hosted web analytics system for websites and applications that need basic statistics without sending data to an advertising platform or remote analytics service. It records aggregate page views in a local SQLite database. It is intended for personal and small websites, not as a replacement for a large analytics platform.
Source code, documentation, and installation guides on GitHub · MIT license.
What is Barelytics?
Barelytics is open-source web traffic analytics that website owners install and operate themselves. It answers straightforward questions: how many views a page received, how traffic changes over time, and, when enabled, which countries or referring domains sent visits. Its reports are aggregate: Barelytics counts page views, not unique people.
It aims to provide a lightweight, controllable alternative to Google Analytics and other tracking services when individual profiles, campaigns, or detailed behavioural analytics are unnecessary. It does not require an account with an analytics provider and does not send data to a central Barelytics service.
What data does Barelytics collect?
With Strict Mode, enabled by default, Barelytics stores a normalized page path, the UTC day, and an aggregate view count. It does not create a persistent visitor identifier or store IP addresses, analytics cookies, browser identifiers, full User-Agent strings, query strings, or complete referrer URLs.
Optional dimensions—such as country, referrer hostname, browser, device, and operating system—are off by default and can be enabled individually in the administration area. Bot filtering is heuristic and may not identify every automated request. Administrators can use a privacy audit to review effective settings, checks, and database schema information.
“Cookie-free” and “privacy-friendly” describe technical data-minimization choices, not a certification or guarantee of legal compliance. Website operators must assess the requirements that apply to their audience, configuration, and jurisdictions.
How do I install and integrate it?
The project includes a PHP implementation using PDO SQLite and packages or integrations for Node.js/TypeScript, Python, .NET, Java, Ruby, and WordPress. Supported versions and exact instructions can change, so check the repository documentation before installing.
- PHP on shared hosting: upload the runtime package over FTP/SFTP, complete the browser-based installer, and add the snippet to your pages. The FTP route does not require SSH, Composer, npm, or mandatory cron.
- Static website with a same-origin PHP endpoint: use the provided JavaScript snippet; the request stays on the same site and the PHP runtime manages the database.
- Node.js, Python, .NET, Java, or Ruby applications: install the relevant package and track views server-side. These runtimes use a local SQLite database and do not depend on a remote Barelytics service.
- WordPress: the repository includes an installable plugin integration; follow its guide and use only one tracking method per page.
To avoid duplicate counts, record only one view per HTML response: choose either server-side integration or the browser snippet, never both on the same page. Server-side integrations should exclude APIs, static files, health checks, feeds, and background jobs.
Documentation: installation, framework and integration recipes, upgrading, and the privacy model.
Requirements and limitations
- The PHP runtime requires a compatible PHP version, PDO SQLite, JSON, and PHP sessions; the installer checks the environment. Use HTTPS before entering production credentials.
- The SQLite database must be stored in a persistent, writable, private location. Ephemeral serverless or edge filesystems are unsuitable.
- Barelytics provides essential aggregate statistics, not unique-visitor metrics, session recordings, heatmaps, or advertising attribution.
- Bot filtering uses heuristics; some automated requests may be included or excluded.
- Installing the software does not by itself determine which notices, consent, or other measures your website needs.
Barelytics frequently asked questions
Does Barelytics use cookies or track visitors?
Default Strict Mode uses no analytics cookies, persistent identifiers, or fingerprinting. It counts aggregate page views. Optional dimensions must be enabled by an administrator.
Is Barelytics a self-hosted Google Analytics alternative?
It can be one when you need basic page counts and trends under your control. It does not replace every feature in Google Analytics or product and marketing platforms: it is not designed for individual profiles or advanced attribution.
Can I install Barelytics using FTP only?
Yes, for the PHP package on compatible hosting: the guide covers FTP/SFTP upload and browser-based setup, without shell access, Composer, npm, or mandatory cron. PHP with PDO SQLite and persistent storage are required.
Does Barelytics work on serverless or edge hosting?
Not when the SQLite filesystem is ephemeral. Every integration needs a persistent data path that survives restarts and deployments.
Does Barelytics guarantee GDPR compliance?
No. It minimizes data collection and provides inspectable settings, but it does not provide a legal guarantee. Compliance depends on the actual use, configuration, and website jurisdiction.
Where can I find the source code, license, and guides?
In the Barelytics GitHub repository: MIT-licensed source code, installation guides, packages, integrations, and the privacy model.