Getting Started

Plausible Analytics is a lightweight, privacy-friendly alternative to Google Analytics. Available as an open web service in Eyevinn Open Source Cloud, Plausible collects only the data you need, stores no cookies, and is fully GDPR-compliant. This tutorial walks you through the steps to get started.

Prerequisites

Step 1: Create a PostgreSQL database

Plausible uses PostgreSQL for storing site configuration, goals, and user accounts. Navigate to the PostgreSQL service in the Eyevinn OSC web console. Click on "Create psql-db" and enter a name for the instance and a password.

Based on the IP and port, the connection URL is postgresql://postgres:<password>@<IP>:<PORT>/postgres.

Step 2: Create a ClickHouse database

Plausible stores all pageview and event data in ClickHouse for high-performance analytics queries. Navigate to the ClickHouse service in the Eyevinn OSC web console. Click on "Create clickhouse" and fill in:

  • Name: a name for your ClickHouse instance (alphanumeric only)
  • Db: a database name, e.g. plausible
  • User: a database user, e.g. plausible
  • Password: a password for that user

Once the instance is running, note the IP and port. The connection URL will be http://plausible:<password>@<IP>:<PORT>/plausible.

Step 3: Store connection URLs as secrets

Navigate to the Plausible Analytics service in the Eyevinn OSC web console. Go to the tab "Service Secrets" and click on "New Secret".

Create the following secrets:

  • pgurl with the PostgreSQL connection URL from Step 1
  • churl with the ClickHouse connection URL from Step 2

Step 4: Create the Plausible instance

Go to the tab "My server" and click on "Create server". Fill in:

  • Name: a name for your instance (alphanumeric only)
  • PostgreSQLUrl: {{secrets.pgurl}}
  • ClickHouseDbUrl: {{secrets.churl}}

Click on the instance card when the status is green and "running".

Step 5: Set up your site

Open the instance URL in your browser. You will be prompted to create an admin account on first visit. Enter your email address and a password.

Once logged in:

  1. Click "Add a website" and enter your domain name
  2. Copy the tracking script snippet shown after adding the site
  3. Paste the snippet into the <head> section of your website's HTML

Your traffic will start appearing in the Plausible dashboard within a minute of the first page visit.

Example tracking snippet:

<script defer data-domain="yourdomain.com" src="https://<your-plausible-instance>/js/script.js"></script>

Replace yourdomain.com with your actual domain and <your-plausible-instance> with your Plausible instance URL.

Using the CLI

You can also create a Plausible instance using the OSC CLI:

# Create a PostgreSQL database
npx @osaas/cli create birme-osc-postgresql mypgdb -o PostgresPassword="pgpassword"

# Create a ClickHouse database
npx @osaas/cli create clickhouse-clickhouse mychdb \
  -o Db="plausible" \
  -o User="plausible" \
  -o Password="chpassword"

# Create the Plausible instance
npx @osaas/cli create plausible-analytics myanalytics \
  -o PostgreSQLUrl="postgresql://postgres:pgpassword@<PG_IP>:<PG_PORT>/postgres" \
  -o ClickHouseDbUrl="http://plausible:chpassword@<CH_IP>:<CH_PORT>/plausible"

Configuration Options

Option Required Description
PostgreSQLUrl Yes PostgreSQL connection string for storing site configuration, goals, and user accounts.
ClickHouseDbUrl Yes ClickHouse connection string for storing all pageview and event data.

Resources