Plausible: Analytics, while preserving privacy

Plausible, The self-hosted Google analytics alternative.
Photo: Burst, Pexels.

Plausible Analytics is a user-friendly and privacy-friendly alternative to Google Analytics. In addition, Plausible is open source and free to use as web analytics. It does not use cookies and is fully compliant with the requirements of the General Data Protection Regulation (GDPR), California Consumer Privacy Act (CCPA) and The Privacy and Electronic Communications (PECR). What is Google Analytics? What are the disadvantages? And why so eager to get rid of Google services like Analytics?

What is Google Analytics?


Google Analytics offers a large scale of features and options that can help you as a webmaster to analyze visitors. Purpose, to get a concrete picture about who is using your APP or the web performance of your web service. But also which pages are visited, whether visitors return and how long visitors view the pages. Since 2019, Google Analytics is the most widely used web analytics service on the Internet. With this, chances are real that you are familiar with Google Analytics. It is easy to implement on existing and new online web services, including APPS and websites. An additional advantage is that Google Analytics is free to use.

What are the disadvantages of Google Analytics?

Google offers an almost unlimited scale of features and options. The question is whether this is desirable ditto manageable for every website and every administrator. After all, the local soccer club is not likely to subject its visitors to in-depth analysis. It is irrelevant for a local club. The administrator, often a volunteer. And more often not familiar with the specialized advanced functions. The question of whether excess does not harm quickly, around the corner. For a simple website you can quickly get lost in the jungle of functions and options. It will therefore quickly become a mish-mash.

The question arises whether Google Analytics is legal to use in the European Union (EU). Data is analyzed from visitors and often stored outside Europe, in the United States. Additionally: What can Google see, analyze and store from your users? Even after you set everything up to be privacy-friendly. Google is rather in silence about this and covers what in a legal complex text of pages long. The use of Google Analytics is being restricted by privacy regulators in more and more European countries. After rulings in Austria and France, Italy also recently followed with a ban.

There is also the disadvantage that an increasing number of surfers is blocking Google Analytics with an Ad-blocker or related technology. This results in a distorted view of how, what, where efficient your website or APP actually is. It appears that by the year 2022, 42.7% of all global Internet users are using an ad-blocker

Plausible: Self-Hosted Google Analytics alternative


Plausible is a free-to-install, open-source alternative to Google Analytics. The data collected by the webmaster remains on the webmaster's own server. 

Personal data of visitors is not stored by default and it has almost the same range of features and options than Google Analytics. It is even possible to export old analytic data from Google Analytics to Plausible.

Plausible Installation


Plausible is easy to install and easy to use. It is a Docker based only product. Start as root. As the Docker Daemon is running on root by default. Plausible contains multiple Docker containers and collectively forms the analytics system. Including one for Plausible itself, a database container, one for mail (to e-mail reports and statistics) etc.

  • Install docker and the docker compose plugin:
    curl -sSL https://get.docker.com/ | CHANNEL=stable sh && apt install docker-compose-plugin
  • Clone the Plausible Git Repository to /opt/plausible-dockerized:
    git clone https://github.com/plausible/hosting /opt/plausible-dockerized
  • You'll need a random 64-character secret key which will be used to secure the APP.
    openssl rand -base64 64 | tr -d '\n' ; ech and write down the code.
  • nano /opt/plausible-dockerized/plausible-conf.env and change to config file with the domain and personal secret key:

    BASE_URL=https://analytics.yourdomain.com
    SECRET_KEY_BASE=eh0kRNNP/xvRYEj47vjcKVYHlVk/zg2X9LmfPKLIvVug==

    It looks something like this.

  • Initialize Plausible by executing the docker compose command:
    cd /opt/plausible-dockerized && docker compose pull && docker compose up -d

Plausible behind Reverse proxy


To access Plausible via the domain https://analytics.yourdomain.com, we use CloudPanel in the example. CloudPanel is a free control panel, running multiple types of sites and APPS on a single server. A reverse proxy can also be installed manually on another server. If needed.

As CloudPanel user. Create a Reverse Proxy and forward the traffic to port 8000. Where port 8000 is Plausible's port where it listens on.

  • In CloudPanel, surft to sites, add site, create a Reverse Proxy. With Domain Name and http://127.0.0.1:8000 as Reverse Proxy Url.
  • Surf to https://analytics.yourdomain.com/register and create a account with: Full name, Email, Password and Password confirmation by choice.
  • Create a website to track. With: Your website details, Domain and Reporting Timezone and Add snipet
  • Add the JavaScript snippet onto the website or into the APP and start collecting data.

The production SSL certificate can be requested. On the CloudPanel's SSL/TLS tab, New Let's Encrypt Certificate section. Your own Plausible Analytics server is ready to serve. And furthermore user-friendly and privacy-friendly. In accordance with your wishes and data within your own control without big tech.

Plausible does not support an out of the box option, to exclude the webmasters' IP addresses from data collection. So that you measure only pure traffic. Of course it is possible to use 3rd party solutions. For example: using an ad blocker or manually blocking the analytics script. It is up to the end user whether this solution is adequate. We would like to see a feature in the software itself that handles this. That way you can control everything from one place.

How to update Plausible

Features for Plausible are constantly being added and updated, and all of them (including security and major feature updates) are delivered to your server from Docker Hub (Container Image Library).

  • Login as root and navigate to the app folder: cd /opt/plausible-dockerized
  • Back-up your files.
  • Power-off the Docker containers: docker-compose down --remove-orphans
  • Download the latest bits: docker-compose pull plausible
  • Start the latest Docker containers: docker-compose up -d

Data Import from Google Analytics


Plausinle and Google Analytics can be used side by side.
Should you want to go completely privacy friendly and only continue with Plausible. There is an option to import existing data from your Google Analytics account into Plausible.

Simply go to the "settings" of the website in question and choose "Continue with Google". Login with the Google account of your choice and choose the Analytics "property" under which the domain is linked.

Choose "Continue" and "Confirm import." The data import will now start.
When data importing is complete, you can view the old data by clicking on the "Google logo" on the right side of the dashboard of the domain in question.

Also check out our how-to on Umami. Should you be looking for a similar product without Docker.