Plausible Analytics

Open-source, cookie-free web analytics that respects visitor privacy and replaces Google Analytics.

24.3Kstars
1.4Kforks
GNU Affero General Public License v3.0
Elixir

Plausible Analytics is an open-source, privacy-first web analytics platform designed for website owners who want clear, actionable insights without the privacy violations and complexity of Google Analytics. Built on Elixir/Phoenix with ClickHouse as the analytics engine, it tracks page views, traffic sources, conversions, and visitor behaviour without storing any personal data, setting cookies, or requiring consent banners.

The platform offers two deployment paths: a managed cloud service hosted exclusively on EU infrastructure for full GDPR and Schrems II compliance, and a Community Edition (CE) that can be self-hosted on any server. Both share the same clean, single-page dashboard that surfaces all key metrics — real-time visitors, top pages, referral sources, countries, devices, and custom conversion goals — without any training required.

Plausible’s business model is subscription-funded rather than ad-supported, meaning there is no data sharing, no surveillance capitalism, and no third-party tracking. Its JavaScript snippet weighs under 1KB, making it faster than alternatives while reducing the environmental footprint of analytics delivery. Features like automatic scroll depth tracking, AI traffic detection, UTM attribution, Google Search Console integration, and a public Stats API cover the full analytics workflow for most teams.

With over 27,000 GitHub stars and an active development cadence of 60+ commits per month, Plausible has established itself as the leading privacy-conscious alternative to Google Analytics, trusted by thousands of paying customers including independent bloggers, SaaS companies, and regulated enterprises across the EU.

What You Get

  • Privacy-First Analytics Dashboard - A single-page, real-time dashboard showing visitors, page views, bounce rate, session duration, traffic sources, top pages, countries, devices, and conversion goals — all without cookies or personal data storage.
  • Sub-1KB Tracking Script - An ultra-lightweight JavaScript snippet that loads faster than Google Analytics and Tag Manager, reducing page weight while maintaining full tracking accuracy.
  • Cookie-Free Compliance by Default - No cookies, no IP address storage, no fingerprinting. Fully compliant with GDPR, CCPA, and PECR out of the box, eliminating the need for consent banners on most sites.
  • Conversion Goals and Funnel Analysis - Track custom events including file downloads, outbound link clicks, form completions, 404 errors, and revenue-attributed ecommerce goals with visual funnel breakdowns.
  • Google Search Console Integration - Import and display organic search keyword data, impressions, click-through rates, and rankings directly in the Plausible dashboard alongside other traffic sources.
  • Automatic Scroll Depth Tracking - Measures how far visitors scroll on every page (from 1% to 100%) without requiring additional tag manager configuration or custom event code.
  • AI Traffic Detection - Identifies and separately labels traffic arriving from AI tools including ChatGPT, Perplexity, and Claude, enabling teams to measure the growing AI-driven referral channel.
  • UTM Campaign Attribution - Automatically groups and visualises traffic from UTM-tagged campaigns across paid ads, email newsletters, and affiliate links with channel-level attribution.
  • Stats API and CSV Export - Access all analytics data programmatically via a documented REST Stats API or export raw breakdowns as CSV for use in external reporting, BI tools, or spreadsheets.
  • Looker Studio Connector - Connect Plausible data directly to Google Looker Studio for custom dashboard creation and integration into existing business intelligence workflows.
  • Team Management and Shared Dashboards - Invite team members with role-based permissions (viewer, editor, admin), and share live public dashboards via unique URLs without requiring a Plausible account.
  • Advanced Bot and Spam Filtering - Cloud plan blocks approximately 32,000 known data-center IP ranges, common bot user agents, and referrer spam domains to ensure metrics reflect genuine human traffic.

Common Use Cases

  • Privacy-compliant analytics for EU businesses - A German SaaS startup replaces Google Analytics with Plausible’s EU-hosted cloud service to comply with Schrems II and GDPR without needing cookie consent banners, while retaining full visitor journey visibility.
  • Self-hosted analytics for regulated industries - A healthcare company self-hosts Plausible CE on their own infrastructure to ensure patient-facing website data never leaves their environment, meeting internal data sovereignty requirements.
  • Content performance tracking for bloggers - An independent blogger uses Plausible to monitor which articles attract organic search traffic and where readers drop off using scroll depth data, without exposing reader behaviour to Google.
  • SaaS product marketing analytics - A product marketing team tracks UTM-tagged campaign performance, conversion funnel drop-off, and goal completions for trial signups across paid search, email, and affiliate channels in a single dashboard.
  • AI traffic analysis for content teams - A content agency monitors which AI referral sources (ChatGPT, Perplexity) are driving traffic to their site and uses the breakdown to prioritise content formats optimised for AI citation.
  • Open-source project website analytics - An open-source maintainer uses Plausible’s free public dashboard feature to transparently share their project’s traffic stats with their community, building trust while getting accurate download and docs page metrics.

Under The Hood

Architecture Plausible follows a well-structured monolithic Elixir/OTP architecture with disciplined separation between ingestion, domain, and web layers. The OTP application supervises distinct named Ecto repositories for PostgreSQL user data, ClickHouse analytics, async write buffers, and ingest paths — each with their own connection pools and failover characteristics. Session state is managed through partitioned Cachex caches backed by ETS for concurrent reads, with separate TTL policies for user agents and session data. A compile-time macro system (on_ee/on_ce) gates enterprise features without runtime branching, producing meaningfully different build artifacts from a single codebase. The stats query layer is a pipeline of composable query builders that emit optimised ClickHouse SQL, gated behind a JSON Schema validation layer that strips enterprise-only fields per build at schema resolution time — not at runtime.

Tech Stack The backend runs on Elixir 1.19 with Phoenix 1.8 and Phoenix LiveView for real-time interactive dashboards served without heavy client-side JavaScript. ClickHouse via the ecto_ch adapter handles analytics ingestion and aggregation queries using columnar types like LowCardinality(String) and UInt8 directly in Ecto schemas, optimising storage density for high-cardinality event writes. PostgreSQL 18 via Ecto 3.13 manages relational user, site, and billing data. Background processing uses Oban 2.20 with multi-queue workers. Observability is deep: OpenTelemetry spans cover Ecto, Phoenix, Oban, and Cowboy with a dedicated PromEx integration. The frontend uses React with TypeScript built via esbuild, while the tracker script is a separate TypeScript project compiled by Rollup and SWC into more than a thousand minified variants serving different feature combinations. Deployment targets Docker on Alpine Linux with distinct CE and EE multi-stage builds.

Code Quality The test suite is comprehensive: over 300 Elixir test files cover unit, integration, and load scenarios, partitioned into six parallel CI groups running against both test and ce_test mix environments with dedicated PostgreSQL and ClickHouse services. End-to-end browser tests run in a separate Playwright suite. Error handling uses structured tagged tuples throughout the Elixir codebase with Sentry integration for production error capture and telemetry events for observability. Static analysis uses Dialyzer with a pre-built PLT, and ExCoveralls measures coverage. TypeScript provides strong typing on the frontend with explicit interface contracts. CI validates database migrations in a dedicated workflow and checks tracker script size on every pull request to guard against bundle bloat.

What Makes It Unique Plausible’s most architecturally distinctive decisions are its compile-time edition system — on_ee/on_ce macros eliminate enterprise feature branches at compile time rather than hiding them behind runtime flags, producing genuinely different community and enterprise binaries from one codebase. The tracker compiler generates over a thousand script variants from a single TypeScript source using SWC dead-code elimination and COMPILE globals, then serves site-specific configuration dynamically interpolated into minified scripts at the CDN edge — solving the configuration vs script size trade-off without a plugin system. The JSON Schema for the query API uses $comment: "only :ee" annotations resolved at application startup to produce different schema contracts per build without duplicating schema definitions, enforcing API surface differences between editions through the validation layer itself.

Self-Hosting

Plausible Analytics is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This is a strong copyleft license: you can use, modify, and distribute the software freely, including for commercial purposes on your own infrastructure, but if you run a modified version as a network service you must make your modifications available under the same AGPL-3.0 terms. For most self-hosters running Plausible CE internally — tracking their own websites without offering it as a service to others — the AGPL has no practical impact. Only teams planning to resell or publicly operate a modified Plausible instance as a product need to engage with the copyleft implications.

Running Plausible Community Edition yourself means taking full responsibility for infrastructure provisioning, updates, backups, and uptime. The stack requires a server capable of running Docker Compose with at least two database services: PostgreSQL for user and site data, and ClickHouse for the analytics event store. ClickHouse in particular requires meaningful RAM and disk for larger sites, and managing ClickHouse upgrades and schema migrations adds operational complexity beyond a typical web application deployment. The CE release cadence is twice per year (long-term releases), meaning you will lag behind the cloud version’s continuous improvements and will need to apply upgrades manually by pulling updated Docker images and restarting the compose stack.

Compared to the managed cloud offering, self-hosting gives up several capabilities: premium bot filtering (cloud blocks approximately 32,000 data center IP ranges; CE uses basic user-agent filtering only), premium features including marketing funnels, ecommerce revenue goals, SSO, and the Sites API, the Looker Studio Connector, and any support beyond the community forum. The cloud plan provides global CDN delivery, high availability, automated backups, and continuous deployment of new features. For teams where privacy means keeping data off third-party servers entirely, CE is the appropriate choice; for teams where privacy means not using Google’s infrastructure, the EU-hosted cloud plan achieves the same goal with far less operational overhead.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search