Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
Go to file
Karl-Aksel Puulmann 7dd12d1dd6
APIv2: Replace breakdown module with QueryBuilder (#4283)
* WIP: Breakdown using QueryBuilder

* Revert "Remove problematic test"

This reverts commit b442bb5d1f.

* Get more breakdown tests passing

* Preload goals, sort when dealing with time_on_page

* Handle conversion_rate in breakdowns

* Simplify ordering by using selected_as consistently for dimensions

* Get breakdown tests passing

* Strings to atoms in keys for StatsController.transform_keys calls to work

* Handle revenue metrics removal

* Add test for nil-removal case

* Include percentage metric

* Fix and test with imported locations

* Fixup time-on-page

* Fix country/region automatic filters

* Handle multiple imports (os/browser version) in importsv2

* Filter goals

* Default to ordering by page as well

* Calculate conversion rate on sessions if needed

* Order by event dimensions - handles event:page special case

* Update tests

* Update more tests, handle goal=0 case in imports

* Handle event:goal breakdowns correctly with filters

* Revenue to money

* Improved table deciding

* Also update event:page filters on event:page breakdown

* bounce_rate to 0

Previous behavior relied on two queries being made - new query leads to 0 naturally

* Update pagination test

* dont count non-pageviews as path goal completions

* Make revenue logic breakdown-specific

Its hard to fit into the new schema and likely needs a rethink for apiv2

* Retain previous behavior for TimeSeries module

* Get GA4 test passing

Most failures are related to ordering, pageviews shouldnt be read off of sessions

* Clean up old methods

* Simplify imported.ex

* Dont crash on garbage filters

* Reflect ordering-related change in test

* Fix test data

* Update table_decider

* Re-simplify get_revenue_tracking_currency

* Revert revenue changes

* Use Query.set

* Remove a TODO

* csv importer: no pageviews

Pageviews were incorrectly fetched from sessions table before, causing issues

* csv importer tweaking

* Remove use Plausible

* to_existing_atom
2024-07-01 09:03:33 +03:00
.github Update build-private-images-ghcr.yml (#4280) 2024-06-26 16:52:37 +02:00
assets Fix new tab links + shared links losing URL context (#4278) 2024-07-01 06:52:35 +02:00
config happy tcp (#4245) 2024-06-24 13:29:55 +02:00
extra APIv2 - initial PR (#4216) 2024-06-25 09:27:19 +03:00
fixture Use max pageSize when fetching data for import from UA (#4260) 2024-06-26 10:48:44 +03:00
lib APIv2: Replace breakdown module with QueryBuilder (#4283) 2024-07-01 09:03:33 +03:00
priv Browser icon improvements (#4246) 2024-06-20 17:32:08 +03:00
rel Allow importing extra config (#3906) 2024-03-19 12:02:52 +01:00
test APIv2: Replace breakdown module with QueryBuilder (#4283) 2024-07-01 09:03:33 +03:00
tracker Snippet integration verification (#4106) 2024-05-23 15:00:50 +02:00
.codespellignore Use codespell (#4145) 2024-05-27 10:52:01 +02:00
.credo.exs Update credo config + extras (#3547) 2023-11-22 20:48:32 +01:00
.dockerignore Dockerfile and co updates (#3811) 2024-03-08 14:33:55 +00:00
.formatter.exs format extra (#3657) 2023-12-29 09:39:36 +01:00
.gitignore Add /tmp/ to .gitignore and simplify s3 cleanups in tests (#3889) 2024-03-12 17:58:05 +01:00
.iex.exs Upgrade Erlang/Elixir stack (#3454) 2023-10-24 10:33:48 +02:00
.pre-commit-config.yaml Add basic test harness for browserstack/playwright (#1961) 2022-08-04 11:50:09 +03:00
.tool-versions update runtime to elixir-1.17.1 and erlang-27.0 (#4255) 2024-06-24 13:22:33 +02:00
CHANGELOG.md APIv2: Replace breakdown module with QueryBuilder (#4283) 2024-07-01 09:03:33 +03:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md 2022-08-04 11:28:21 +03:00
CONTRIBUTING.md Simplify asset building (#3459) 2023-11-01 16:27:29 +02:00
Dockerfile fix CE Docker build (#4271) 2024-06-25 07:13:59 +02:00
LICENSE.md Use AGPL license going forward 2020-10-12 16:21:25 +03:00
Makefile Snippet integration verification (#4106) 2024-05-23 15:00:50 +02:00
mix.exs happy tcp (#4245) 2024-06-24 13:29:55 +02:00
mix.lock Update deps - follow up to #4255 (#4267) 2024-06-24 16:50:19 +02:00
README.md Update README.md 2024-02-23 14:44:32 +01:00
SECURITY.md Update SECURITY.md 2023-11-27 21:59:26 +01:00

Plausible Analytics

Plausible Analytics

Simple Metrics | Lightweight Script | Privacy Focused | Open Source | Docs | Contributing

Plausible Analytics is an easy to use, lightweight (< 1 KB), open source and privacy-friendly alternative to Google Analytics. It doesnt use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host Plausible Community Edition or have us manage Plausible Analytics for you in the cloud. Here's the live demo of our own website stats. Made and hosted in the EU 🇪🇺

We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesnt come from the AdTech world. We are completely independent and solely funded by our subscribers.

Plausible Analytics

Why Plausible?

Here's what makes Plausible a great Google Analytics alternative and why we're trusted by 12,000+ paying subscribers to deliver their website and business insights:

  • Clutter Free: Plausible Analytics provides simple web analytics and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary.
  • GDPR/CCPA/PECR compliant: Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. Read more about our data policy
  • Lightweight: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is 45x smaller, making your website quicker to load. You can also send events directly to our events API.
  • Email or Slack reports: Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications.
  • Invite team members and share stats: You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them. You can invite team members and assign user roles too.
  • Define key goals and track conversions: Create custom events with custom dimensions to track conversions and attribution to understand and identify the trends that matter. Includes easy ways to track outbound link clicks, file downloads and 404 error pages.
  • Search keywords: Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords.
  • SPA support: Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See our documentation.
  • Smooth transition from Google Analytics: There's a realtime dashboard, entry pages report and integration with Search Console. You can track your paid campaigns and conversions. You can invite team members. You can even import your historical Google Analytics stats. Learn how to get the most out of your Plausible experience and join thousands who have already migrated from Google Analytics.

Interested to learn more? Read more on our website, learn more about the team and the goals of the project on our about page or explore the documentation.

Why is Plausible Analytics Cloud not free like Google Analytics?

Plausible Analytics is an independently owned and actively developed project. To keep the project development going, to stay in business, to continue putting effort into building a better product and to cover our costs, we need to charge a fee.

Google Analytics is free because Google has built their company and their wealth by collecting and analyzing huge amounts of personal information from web users and using these personal and behavioral insights to sell advertisements.

Plausible has no part in that business model. No personal data is being collected and analyzed either. With Plausible, you 100% own and control all of your website data. This data is not being shared with or sold to any third-parties.

We choose the subscription business model rather than the business model of surveillance capitalism. See reasons why we believe you should stop using Google Analytics on your website.

Getting started with Plausible

The easiest way to get started with Plausible Analytics is with our official managed service in the cloud. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us.

In order to be compliant with the GDPR and the Schrems II ruling, all visitor data for our managed service in the cloud is exclusively processed on servers and cloud infrastructure owned and operated by European providers. Your website data never leaves the EU.

Our managed hosting can save a substantial amount of developer time and resources. For most sites this ends up being the best value option and the revenue goes to funding the maintenance and further development of Plausible. So youll be supporting open source software and getting a great service!

Can Plausible be self-hosted?

Plausible is open source web analytics and we have a free as in beer and self-hosted solution called Plausible Community Edition (CE). Here are the differences between Plausible Analytics managed hosting in the cloud and the Plausible CE:

Plausible Analytics Cloud Plausible Community Edition
Infrastructure management Easy and convenient. It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us. We manage everything so you dont have to worry about anything and can focus on your stats. You do it all yourself. You need to get a server and you need to manage your infrastructure. You are responsible for installation, maintenance, upgrades, server capacity, uptime, backup, security, stability, consistency, loading time and so on.
Release schedule Continuously developed and improved with new features and updates multiple times per week. It's a long term release published twice per year so latest features and improvements won't be immediately available.
Premium features All features available as listed in our pricing plans. Selected premium features such as funnels and ecommerce revenue goals are not available as we aim to ensure a protective barrier around our cloud offering.
Bot filtering Advanced bot filtering for more accurate stats. Our algorithm detects and excludes non-human traffic patterns. We also exclude known bots by the User-Agent header and filter out traffic from data centers and referrer spam domains. Basic bot filtering that targets the most common non-human traffic based on the User-Agent header and referrer spam domains.
Server location All visitor data is exclusively processed on EU-owned cloud infrastructure. We keep your site data on a secure, encrypted and green energy powered server in Germany. This ensures that your site data is protected by the strict European Union data privacy laws and ensures compliance with GDPR. Your website data never leaves the EU. You have full control and can host your instance on any server in any country that you wish. Host it on a server in your basement or host it with any cloud provider wherever you want, even those that are not GDPR compliant.
Data portability You see all your site stats and metrics on our modern-looking, simple to use and fast loading dashboard. You can only see the stats aggregated in the dashboard. You can download the stats using the CSV export, stats API or tools such as the Data Studio Connector. Do you want access to the raw data? Self-hosting gives you that option. You can take the data directly from the ClickHouse database.
Premium support Real support delivered by real human beings who build and maintain Plausible. Premium support is not included. CE is community supported only.
Costs There's a cost associated with providing an analytics service so we charge a subscription fee. We choose the subscription business model rather than the business model of surveillance capitalism. Your money funds further development of Plausible. You need to pay for your server, CDN, backups and whatever other cost there is associated with running the infrastructure. You never have to pay any fees to us. Your money goes to 3rd party companies with no connection to us.

Interested in self-hosting Plausible CE on your server? Take a look at our Plausible CE installation instructions.

Plausible CE is a community supported project and there are no guarantees that you will get support from the creators of Plausible to troubleshoot your self-hosting issues. There is a community supported forum where you can ask for help.

Our only source of funding is our premium, managed service for running Plausible in the cloud.

Technology

Plausible Analytics is a standard Elixir/Phoenix application backed by a PostgreSQL database for general data and a Clickhouse database for stats. On the frontend we use TailwindCSS for styling and React to make the dashboard interactive.

Contributors

For anyone wishing to contribute to Plausible, we recommend taking a look at our contributor guide.

Feedback & Roadmap

We welcome feedback from our community. We have a public roadmap driven by the features suggested by the community members. Take a look at our feedback board. Please let us know if you have any requests and vote on open issues so we can better prioritize.

To stay up to date with all the latest news and product updates, make sure to follow us on X (formerly Twitter), LinkedIn or Mastodon.

License & Trademarks

Plausible CE is open source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find it here.

To avoid issues with AGPL virality, we've released the JavaScript tracker which gets included on your website under the MIT license. You can find it here.

Copyright (c) 2018-present Plausible Insights OÜ. Plausible Analytics name and logo are trademarks of Plausible Insights OÜ. Please see our trademark guidelines for info on acceptable usage.