Umami Analytic - Alternative To Google Analytics And Cookie Free

Many of us have used Google analytics to get website usage analytics from our websites. The analytics provided by google is great and is unmatched as it is a tech giant product and captures more than what you need.

But

GDRP data protection makes website owners keep the data local to EU, as it is prohibited to send data outside EU. And Google analytics sends some/all of the google analytics data to google servers in US. Here is an article which explains a case of illegal google analytics in Austria- https://matomo.org/blog/2022/01/google-analytics-gdpr-violation/

This lead me to search for alternatives of google analytics, which must be quick to deploy and has all the basic functionalities to analyse user stats. Some of the alternatives i found: https://www.leadfeeder.com/blog/google-analytics-alternatives/

Ultimately I selected Umami Analytics for the following reasons,

  1. Available as a docker image and can be deployed on prem/ local to EU.
  2. Open source and free to use. Licensed under MIT- GitHub code is here - https://github.com/mikecao/umami
  3. It is developed in react which I am familiar with and can use the code base and modify if support is stopped.

This is the dashboard of Umami,

Mode details can be found here.

I used the following docker compose file to delopy umami with postgres DB and test local.

version: '3'
services:
  umami:
    image: ghcr.io/mikecao/umami:postgresql-latest
    ports:
      - "3001:3000"
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami
      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: admin
      POSTGRES_PASSWORD: 424rgygkQfTM9tT3
    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: