DEV Community

Cover image for Umami: An Open-Source Web Analytics Solution
Sh Raj
Sh Raj

Posted on

Umami: An Open-Source Web Analytics Solution

Umami: An Open-Source Web Analytics Solution

Image description

In today's digital landscape, understanding user behavior is crucial for improving user experience and making data-driven decisions. Umami is an open-source web analytics solution designed to provide comprehensive insights into your website's performance while prioritizing user privacy. In this article, we'll delve into what Umami is, its key features, various use cases, and a detailed guide on how to get started with it.

GitHub logo umami-software / umami

Umami is a simple, fast, privacy-focused alternative to Google Analytics.

Umami Logo

Umami

Umami is a simple, fast, privacy-focused alternative to Google Analytics.

GitHub Release MIT License Build Status Umami Demo


πŸš€ Getting Started

A detailed getting started guide can be found at umami.is/docs.


πŸ›  Installing from Source

Requirements

  • A server with Node.js version 16.13 or newer
  • A database. Umami supports MySQL (minimum v8.0) and PostgreSQL (minimum v12.14) databases.

Install Yarn

npm install -g yarn
Enter fullscreen mode Exit fullscreen mode

Get the Source Code and Install Packages

git clone https://github.com/umami-software/umami.git
cd umami
yarn install
Enter fullscreen mode Exit fullscreen mode

Configure Umami

Create an .env file with the following:

DATABASE_URL=connection-url
Enter fullscreen mode Exit fullscreen mode

The connection URL format:

postgresql://username:mypassword@localhost:5432/mydb
mysql://username:mypassword@localhost:3306/mydb
Enter fullscreen mode Exit fullscreen mode

Build the Application

yarn build
Enter fullscreen mode Exit fullscreen mode

The build step will create tables in your database if you are installing for the first time. It will also create a login user with username admin and password umami.

Start the Application

yarn start
Enter fullscreen mode Exit fullscreen mode

By default, this will launch the application on http://localhost:3000. You will need to either proxy requests from your web server or change…




Umami

Umami is a simple, fast, privacy-focused alternative to Google Analytics. It offers essential metrics for understanding your website's traffic and user interactions without the complexity and bloat of traditional analytics platforms.

Key Features

  1. Privacy-Focused: Umami respects user privacy by not using cookies and not collecting any personally identifiable information (PII). This ensures compliance with privacy regulations like GDPR and CCPA.
  2. Open Source: Umami is free to use and can be customized to suit your needs. The source code is available on GitHub.
  3. Simple Setup: Designed for ease of use, Umami can be deployed on your server or using managed hosting services.
  4. Real-Time Data: Get real-time analytics, allowing you to see visitor data as it happens.
  5. Customizable Dashboard: A clean, customizable dashboard lets you control which metrics you want to see.
  6. Multi-Site Support: Monitor multiple websites from a single Umami instance, ideal for agencies or users with multiple projects.
  7. Event Tracking: Supports custom event tracking, enabling you to monitor specific actions on your website, such as button clicks and form submissions.
  8. Responsive Design: Access your analytics on any device with a fully responsive dashboard.

Use Cases

1. Website Performance Monitoring

Umami provides essential metrics like page views, unique visitors, bounce rates, and session durations, helping you understand how users interact with your website and identify areas for improvement.

2. Marketing Campaign Tracking

With Umami's event tracking, you can monitor the performance of marketing campaigns by tracking specific user actions such as link clicks, form submissions, and more. This helps you measure the effectiveness of your campaigns and optimize them for better results.

3. Compliance with Privacy Regulations

If your business operates in regions with strict privacy regulations (e.g., GDPR, CCPA), Umami's privacy-focused approach ensures that you can collect analytics data without compromising user privacy or violating regulations.

4. Managing Multiple Websites

For digital agencies or individuals managing multiple websites, Umami's multi-site support allows you to monitor all your sites from a single dashboard, simplifying analytics management and reporting.

Getting Started with Umami

A detailed getting started guide can be found at umami.is/docs.

Installing from Source

Requirements

  • A server with Node.js version 16.13 or newer.
  • A database. Umami supports MySQL (minimum v8.0) and PostgreSQL (minimum v12.14) databases.

Install Yarn

npm install -g yarn
Enter fullscreen mode Exit fullscreen mode

Get the Source Code and Install Packages

git clone https://github.com/umami-software/umami.git
cd umami
yarn install
Enter fullscreen mode Exit fullscreen mode

Configure Umami

Create an .env file with the following:

DATABASE_URL=connection-url
Enter fullscreen mode Exit fullscreen mode

The connection URL format:

  • PostgreSQL: postgresql://username:mypassword@localhost:5432/mydb
  • MySQL: mysql://username:mypassword@localhost:3306/mydb

Build the Application

yarn build
Enter fullscreen mode Exit fullscreen mode

The build step will create tables in your database if you are installing for the first time. It will also create a login user with username admin and password umami.

Start the Application

yarn start
Enter fullscreen mode Exit fullscreen mode

By default, this will launch the application on http://localhost:3000. You will need to either proxy requests from your web server or change the port to serve the application directly.

Installing with Docker

To build the Umami container and start up a Postgres database, run:

docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Alternatively, to pull just the Umami Docker image with PostgreSQL support:

docker pull docker.umami.is/umami-software/umami:postgresql-latest
Enter fullscreen mode Exit fullscreen mode

Or with MySQL support:

docker pull docker.umami.is/umami-software/umami:mysql-latest
Enter fullscreen mode Exit fullscreen mode

Getting Updates

To get the latest features, simply do a pull, install any new dependencies, and rebuild:

git pull
yarn install
yarn build
Enter fullscreen mode Exit fullscreen mode

To update the Docker image, simply pull the new images and rebuild:

docker compose pull
docker compose up --force-recreate
Enter fullscreen mode Exit fullscreen mode

Support

For additional support, you can visit:

Conclusion

Umami is a powerful, privacy-focused web analytics solution that offers a clean, simple interface for understanding your website traffic. Its open-source nature and ease of deployment make it an excellent choice for developers and businesses looking to gain insights without compromising user privacy. Whether you're a small business owner, a web developer, or a digital marketer, Umami provides the tools you need to make data-driven decisions and improve your online presence.

For more information and to get started with Umami, visit their GitHub page.


By implementing Umami, you can enjoy comprehensive web analytics while ensuring your users' privacy and maintaining compliance with global data protection regulations. Give it a try and see how it can transform your understanding of user behavior on your website.

Top comments (0)