Setting Up an Ignore List for Umami Web Analytics

Umami is a powerful web analytics tool that respects user privacy and maintains data control by being self-hosted. This blog post serves as a brief follow-up to my previous article on setting up Umami with Hugo, which you can check out here.

Today, we’re going to learn how to set up an ignore list for Umami that excludes our IP from the list of website visitors. Specifically, we’ll assume a Docker Compose deployment.

1. Add IGNORE_IP and IGNORE_HOSTNAME Variables

With respect to the official Umami documentation, both the IGNORE_IP and IGNORE_HOSTNAME variables should be entered into the same .env file where DATABASE_URL is located.

2. Modify Your Compose yaml File

Insert the following modifications to your yaml file:

services:
  umami:
    image: ghcr.io/umami-software/umami:postgresql-latest
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami
      DATABASE_TYPE: postgresql
      APP_SECRET: ${APP_SECRET}
      IGNORE_IP: ${IGNORE_IP}
      IGNORE_HOSTNAME: ${IGNORE_HOSTNAME}
[...]

3. Customize Your .env File

Once your yaml file has been modified, you should update your .env file accordingly. Here’s an example:

APP_SECRET=mysecret
IGNORE_IP=192.168.0.0/16,123.123.123.123
IGNORE_HOSTNAME=blog.example.com,workstation.example.com

4. Reload the Umami App

After applying these changes, execute the command docker compose down && docker compose up -d. This reloads the Umami app and implements your updated settings.

By enforcing internal traffic filtering, you’ll be sure to receive an accurate representation of your external audience, all while utilizing a reliable, self-hosted, open-source analytics platform such as Umami.

Thanks for reading!