Umami: An Open-Source Web Analytics Solution
Published: 2024-07-05 16:49:17

# Umami: An Open-Source Web Analytics Solution


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgv9f7o39l5t0ivqiiox.png)



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 https://github.com/umami-software/umami 

%}

## 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](https://github.com/umami-software/umami).
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](https://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

```bash
npm install -g yarn
```

#### Get the Source Code and Install Packages

```bash
git clone https://github.com/umami-software/umami.git
cd umami
yarn install
```

#### Configure Umami

Create an `.env` file with the following:

```plaintext
DATABASE_URL=connection-url
```

The connection URL format:

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

#### Build the Application

```bash
yarn build
```

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

```bash
yarn start
```

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:

```bash
docker compose up -d
```

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

```bash
docker pull docker.umami.is/umami-software/umami:postgresql-latest
```

Or with MySQL support:

```bash
docker pull docker.umami.is/umami-software/umami:mysql-latest
```

### Getting Updates

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

```bash
git pull
yarn install
yarn build
```

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

```bash
docker compose pull
docker compose up --force-recreate
```

## Support

For additional support, you can visit:

- [GitHub](https://github.com/umami-software/umami)
- [Twitter](https://twitter.com/umamianalytics)
- [LinkedIn](https://www.linkedin.com/company/umami-software/)
- [Discord](https://discord.gg/umami)

## 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](https://github.com/umami-software/umami).

---

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.