Top Related Projects
Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
Quick Overview
Umami is an open-source, privacy-focused alternative to Google Analytics. It provides website owners with detailed insights into their site's traffic and user behavior without compromising visitor privacy. Umami is designed to be simple to use, easy to install, and lightweight.
Pros
- Privacy-focused: Does not use cookies and complies with GDPR regulations
- Self-hosted: Gives users full control over their data
- Lightweight: Minimal impact on website performance
- User-friendly interface: Easy to understand and navigate
Cons
- Limited features compared to more comprehensive analytics tools
- Requires self-hosting, which may be challenging for non-technical users
- Smaller community and ecosystem compared to established alternatives
- May require additional setup for advanced tracking scenarios
Getting Started
To get started with Umami:
-
Clone the repository:
git clone https://github.com/umami-software/umami.git
-
Install dependencies:
cd umami npm install
-
Create a
.env
file in the root directory and add your database configuration:DATABASE_URL=postgresql://username:password@localhost:5432/umami
-
Run the database migrations:
npm run build npm run db-migrate
-
Start the application:
npm run start
-
Access the Umami dashboard at
http://localhost:3000
and create your account. -
Add the tracking script to your website:
<script async defer data-website-id="YOUR-WEBSITE-ID" src="https://your-umami-url/umami.js"></script>
Replace YOUR-WEBSITE-ID
with the ID provided in the Umami dashboard and https://your-umami-url
with the URL where you've deployed Umami.
Competitor Comparisons
Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
Pros of Plausible
- Lightweight and privacy-focused, with no cookies and GDPR compliance
- Simple, clean interface with easy-to-understand metrics
- Open-source with a strong community and regular updates
Cons of Plausible
- Less detailed analytics compared to Umami
- Fewer customization options for data visualization
- Paid hosting service, while Umami offers a free self-hosted option
Code Comparison
Plausible (JavaScript snippet):
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/plausible.js"></script>
Umami (JavaScript snippet):
<script async defer data-website-id="YOUR-WEBSITE-ID" src="https://your-umami-app.com/umami.js"></script>
Both projects use similar lightweight JavaScript snippets for tracking, with Plausible's being slightly simpler. Umami requires a website ID, while Plausible uses a domain name.
Plausible and Umami are both privacy-focused analytics tools, but they differ in their approach and features. Plausible offers a more streamlined experience with a focus on simplicity, while Umami provides more detailed analytics and customization options. The choice between the two depends on specific needs for data granularity, hosting preferences, and budget considerations.
Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
Pros of Matomo
- More comprehensive feature set, including e-commerce tracking, heatmaps, and A/B testing
- Larger community and ecosystem, with numerous plugins and integrations available
- Self-hosted option provides greater control over data and compliance with privacy regulations
Cons of Matomo
- More complex setup and configuration process compared to Umami's simplicity
- Higher resource requirements, potentially impacting performance on smaller servers
- Steeper learning curve for new users due to the extensive feature set
Code Comparison
Umami (JavaScript tracking code):
<script async defer data-website-id="YOUR-WEBSITE-ID" src="https://your-umami-website.com/umami.js"></script>
Matomo (JavaScript tracking code):
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//your-matomo-website.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', 'YOUR-SITE-ID']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
Both projects offer website analytics solutions, but Matomo provides a more feature-rich experience at the cost of increased complexity. Umami focuses on simplicity and ease of use, making it a good choice for smaller projects or those prioritizing a lightweight solution.
🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
Pros of PostHog
- More comprehensive feature set, including product analytics, session recording, and feature flags
- Scalable for larger organizations and enterprise use cases
- Extensive API and integration options
Cons of PostHog
- More complex setup and configuration process
- Higher resource requirements for hosting and maintenance
- Steeper learning curve for new users
Code Comparison
PostHog (Python):
from posthog import Posthog
posthog = Posthog(project_api_key='your_api_key', host='https://app.posthog.com')
posthog.capture('distinct_id', 'event_name', {
'property1': 'value1',
'property2': 'value2'
})
Umami (JavaScript):
<script async defer data-website-id="YOUR-WEBSITE-ID" src="https://your-umami-app.com/umami.js"></script>
PostHog offers a more flexible API for custom event tracking, while Umami provides a simpler script-based implementation for basic web analytics. PostHog's code allows for more detailed event properties and custom implementations, whereas Umami focuses on ease of use with a single script tag for most use cases.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Umami
Umami is a simple, fast, privacy-focused alternative to Google Analytics.
ð 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
Get the Source Code and Install Packages
git clone https://github.com/umami-software/umami.git
cd umami
yarn install
Configure Umami
Create an .env
file with the following:
DATABASE_URL=connection-url
The connection URL format:
postgresql://username:mypassword@localhost:5432/mydb
mysql://username:mypassword@localhost:3306/mydb
Build the Application
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
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:
docker compose up -d
Alternatively, to pull just the Umami Docker image with PostgreSQL support:
docker pull docker.umami.is/umami-software/umami:postgresql-latest
Or with MySQL support:
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:
git pull
yarn install
yarn build
To update the Docker image, simply pull the new images and rebuild:
docker compose pull
docker compose up --force-recreate
ð Support
Top Related Projects
Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot