Table of Contents

Umami is a self hosted version of your own Google Analytics. It provides privacy friendly analytics on your website’s visitors. There is no cookie tracking and it provides a pretty dashboard UI. I find it very minimalistic and packed with adequate features for any analytic purpose. It gives a very good overview of Visitor’s count (also live), Pages, Referrers, Browsers, Operating systems, Devices, Countries and a Map.

Installation:

https://umami.is/docs/install – official docs

I personally prefer docker to host one. docker-compose.yml file below

---
version: '3'
services:
  umami:
    image: ghcr.io/mikecao/umami:postgresql-latest
    ports:
      - "3000:3000" #change port [optional]
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami #change db, db name and password as required. See db: below
      DATABASE_TYPE: postgresql
      HASH_SALT: replace-me-with-a-random-string
    depends_on:
      - db
    restart: always
  db:
    image: postgres:12-alpine
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: umami
    volumes:
      - ./sql/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro
      - umami-db-data:/var/lib/postgresql/data
    restart: always
volumes:
  umami-db-data:

docker compose up -d

Make sure you see the docker container while running docker ps -a

All set. You should see your instance running on http://your.ip/3000 #optional but recommended, use a reverse proxy like nginx/caddy to serve via SSL.

You can add a website by providing Name, Domain and Enable share URL (optional for now). After adding, you should be able to get the tracking code.

Umami Dashboard view You can place the code under <head> of your website. For WordPress, use Head, Footer and Post Injections plugin. Shown as below image.

Umami wordpress header injection Here is an example demo from the official website https://app.umami.is/share/8rmHaheU/umami.is

Reference:

https://umami.is/

https://discord.gg/4dz4zcXYrQ – community discord for support