Open Analytics
An open-source and free forever analytics plugin for WordPress.
by Open Analytics contributors · github.com/draynur/open-analytics · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/draynur/open-analytics/archive/refs/heads/main.zipA free, privacy-friendly, self-hosted analytics dashboard for WordPress. No cookies required by default, no data sold to anyone, no premium upsell.
Description
Open Analytics shows you visitors, pageviews, top pages, referrers, countries, devices, browsers, campaigns, and custom events — right inside your WordPress dashboard.
- Fast: the tracking endpoint bypasses WordPress and the database entirely, so it works even on fully cached pages.
- Private: no IP address or user agent is ever stored. Cookieless by default; no consent banner required.
- Free: every feature is free. No Pro tier, no locked reports, no email upsells.
- Self-hosted: your data stays in your own database. Country lookups use a local, downloaded database — no third-party API calls per visitor.
Features
- Visitors, pageviews, top pages, and referrers
- Countries, browsers, operating systems, and device types
- UTM campaign tracking
- Custom event tracking (outbound links, downloads, mailto/tel, and a JS/PHP API for your own events)
- CSV/JSON export
- Public, optionally password-protected read-only dashboard
- Gutenberg blocks, shortcodes, and a classic dashboard widget
- REST API and WP-CLI (
wp open-analytics aggregate|prune|stats|export|generate-test-data|wipe-test-data|refresh-geodb|debug)
Installation
- Upload the
open-analyticsfolder to/wp-content/plugins/, or install through the Plugins screen. - Activate the plugin.
- Visit Analytics in your admin menu. That's it — no account, no API key.
Frequently Asked Questions
Does this use cookies?
Not by default. The cookieless tracking method identifies returning visitors with a one-way hash that rotates daily and is never linked back to an IP address or user agent.
Where does the country data come from?
A free, CC-BY-4.0 licensed country database from DB-IP, downloaded to your own server and refreshed monthly. Lookups happen locally; no visitor data is sent to a third party.
What draws the charts?
Apache ECharts (Apache License 2.0), bundled with the plugin as a self-built, self-hosted file containing only the line, bar, and pie charts this dashboard uses (assets/js/vendor/echarts.min.js, license text alongside it). It's only ever loaded on the Analytics dashboard and the public dashboard — never on your site's actual pages, and never from a third-party CDN.
I run nginx, not Apache — is my raw data protected?
The plugin writes an .htaccess file into its wp-content/uploads/open-analytics/ data directory that blocks direct web requests for the raw hit log and its generated config file. .htaccess has no effect on nginx, so add this to your site's server block instead:
location ~* /wp-content/uploads/open-analytics/.*\.(ndjson|dat|processing)$ { deny all; } location = /wp-content/uploads/open-analytics/config.php { deny all; }
Changelog
0.1.0
- Initial release.
- Dashboard charts (pageviews/visitors trend, top pages, referrers, countries, campaigns, browsers, devices) render with Apache ECharts.