LogoVibe Coding Resources
AboutContact
LogoVibe Coding Resources

Curated coding resources to help you learn and grow as a developer.

Categories

ToolsCoursesX (formerly Twitter)YouTubeBlogs

Legal

AboutContactPrivacy PolicyTerms of ServiceAffiliate DisclosureAdvertising Policy

© 2025 Vibe Coding Resources. All rights reserved.

Built with Next.js, React, and Tailwind CSS

  1. Home
  2. Projects
  3. Umami Analytics

Umami Analytics

ToolTypeScript⭐ 33k+MIT
Visit ProjectView Repository

Share

TwitterFacebookLinkedIn

About

Why Umami Stands Out in the Open-Source Analytics Landscape

The Umami GitHub repository represents more than just another analytics solution—it embodies a fundamental shift toward privacy-respecting web measurement. With over 33,400 stars and 5,900 forks, this open-source project has captured the attention of developers worldwide who are tired of sacrificing user privacy for insights. Built with modern technologies like Next.js, TypeScript, and PostgreSQL, Umami delivers enterprise-grade analytics without the complexity or privacy compromises of traditional platforms.

What makes Umami exceptional is its cookieless architecture that eliminates GDPR consent requirements while still providing comprehensive website metrics. Unlike Google Analytics, which feeds user data into advertising ecosystems, Umami keeps your analytics data entirely under your control. This self-hosted approach means you own every data point, never sharing visitor information with third parties or external vendors.

Core Features That Power Privacy-First Analytics

Real-Time Traffic Monitoring

Umami's real-time dashboard gives you instant visibility into visitor activity across your websites. The platform tracks:

  • Active visitor counts with geographic distribution
  • Page views and navigation patterns across your site
  • Traffic sources and referrer information for attribution
  • Device, browser, and OS analytics for optimization
  • Custom event tracking for conversion measurement

Multi-Website Management at Scale

Managing analytics for multiple properties becomes effortless with Umami's workspace system. Whether you're:

  1. Agency owner tracking client websites
  2. Product manager monitoring multiple applications
  3. Developer maintaining personal projects
  4. Enterprise team overseeing brand portfolios

Each website maintains independent tracking while you control everything from one centralized dashboard interface.

Advanced Custom Event Tracking

Go beyond simple page views to measure actions that actually matter for your business:

// Track button clicks
umami.track('signup-clicked', { plan: 'premium' });

// Monitor feature usage
umami.track('export-completed', { format: 'csv' });

// Measure conversions
umami.track('purchase', { value: 99.99, currency: 'USD' });

The lightweight JavaScript API integrates seamlessly with modern frameworks like Next.js and React applications.

Technical Architecture and Technology Stack

Modern TypeScript Foundation

Umami is built with TypeScript (97.4% of codebase), providing type safety and exceptional developer experience. This choice ensures:

  • Reduced runtime errors through compile-time checking
  • Enhanced IDE autocomplete and intelligent code suggestions
  • Better documentation through type definitions
  • Easier maintenance and refactoring capabilities

Database Architecture Comparison

DatabaseSupport StatusPerformanceUse Case
PostgreSQLPrimary (v12.14+)ExcellentProduction deployments
MySQLDeprecated in v3GoodLegacy only
ClickHouseNot supportedN/AAlternative platforms

Starting with Umami v3.0, PostgreSQL is the exclusive database backend, optimizing for performance and feature consistency.

Deployment Options for Every Environment

Docker Deployment (Recommended):

docker pull docker.umami.is/umami-software/umami:latest
docker-compose up -d

Platform-as-a-Service Options:

  • Deploy to Vercel for serverless hosting
  • Use DigitalOcean App Platform for managed infrastructure
  • Host on Render for simplified deployment
  • Self-host on VPS providers for maximum control

Source Installation:

git clone https://github.com/umami-software/umami.git
cd umami
pnpm install
pnpm build
pnpm start

Why Developers Choose Umami Over Alternatives

Privacy-First Design Philosophy

Traditional analytics platforms treat privacy as a compliance checkbox. Umami treats it as a core architectural principle:

  • No cookies means no consent banners required
  • No personal data collection eliminates GDPR headaches
  • No tracking scripts following users across websites
  • Complete data ownership with self-hosted infrastructure

Comparison: Umami vs Other Self-Hosted Analytics

FeatureUmamiPlausibleMatomo
Script Size2KB<1KB22.8KB
DatabasePostgreSQLClickHouseMySQL/MariaDB
Setup ComplexityEasyModerateComplex
Resource UsageLowModerateHigh
Feature RichnessBalancedMinimalExtensive
Docker SupportExcellentGoodAvailable

Umami strikes the optimal balance between simplicity and functionality, making it ideal for developers who want powerful analytics without operational overhead.

Getting Started: From Clone to Production

Step 1: Prerequisites Setup

Before deploying Umami, ensure you have:

  1. Node.js 18.18 or newer installed on your system
  2. PostgreSQL 12.14+ database instance running
  3. pnpm package manager for dependency management
  4. Git for cloning the repository from GitHub

Step 2: Environment Configuration

Create a .env file with your database connection:

DATABASE_URL=postgresql://username:password@localhost:5432/umami
HASH_SALT=your-secure-random-hash-salt-here

The HASH_SALT should be a randomly generated string for securing tracking data.

Step 3: Database Migration

Umami includes automated migration scripts that create all necessary tables:

pnpm install
pnpm prisma migrate deploy

This sets up your PostgreSQL database with the complete Umami schema.

Step 4: Build and Launch

Compile the TypeScript codebase and start the server:

pnpm build
pnpm start

Your Umami instance runs on port 3000 by default. Access the dashboard and create your first website tracking profile.

Integration Patterns for Modern Applications

Next.js Applications

For Next.js projects, add the Umami script to your _app.tsx or use Next.js Script component:

import Script from 'next/script';

export default function App({ Component, pageProps }) {
  return (
    <>
      <Script
        src="https://analytics.yourdomain.com/script.js"
        data-website-id="your-website-id"
        strategy="afterInteractive"
      />
      <Component {...pageProps} />
    </>
  );
}

React Applications with Custom Hooks

Create reusable hooks for tracking events throughout your React application:

import { useCallback } from 'react';

export function useUmamiTrack() {
  return useCallback((event: string, data?: object) => {
    if (window.umami) {
      window.umami.track(event, data);
    }
  }, []);
}

Static Site Generator Support

Umami works seamlessly with static site generators including Hugo, Jekyll, Gatsby, and Eleventy. Simply include the tracking script in your HTML template.

Contributing to the Umami Ecosystem

Active Community and Development

The Umami repository showcases 328 contributors actively improving the platform. Recent contributions include:

  • Enhanced cohort analysis features in v3.0
  • Improved segmentation capabilities for user groups
  • Performance optimizations for high-traffic websites
  • Extended API documentation for developers
  • New dashboard visualization components

How to Contribute

  1. Fork the repository on GitHub
  2. Create a feature branch for your changes
  3. Write tests for new functionality
  4. Submit pull requests with clear descriptions
  5. Engage with maintainers through issues and discussions

MIT License Advantages

The MIT license provides maximum flexibility for developers:

  • Use Umami in commercial projects without restrictions
  • Modify source code to fit specific requirements
  • Create derivative works and custom distributions
  • No copyleft obligations requiring code sharing

Real-World Use Cases and Success Stories

SaaS Product Analytics

Track user engagement across your application without compromising customer privacy. Monitor feature adoption, identify drop-off points, and optimize onboarding flows—all while maintaining GDPR compliance.

Content Publishing Platforms

Understand which articles resonate with readers, measure engagement time, analyze traffic sources, and optimize content strategy based on actionable insights rather than vanity metrics.

E-Commerce Performance Tracking

Monitor product page views, track checkout completion rates, identify cart abandonment patterns, and measure marketing campaign effectiveness while respecting customer privacy throughout the purchase journey.

Developer Tool Adoption

For companies building developer-focused products, Umami tracks documentation usage, measures API adoption rates, and identifies areas where developers struggle—crucial data for improving developer experience.

Security and Compliance Considerations

Data Protection Built-In

Umami's architecture ensures security by design:

  • Anonymous visitor tracking without persistent identifiers
  • No cross-site tracking capabilities
  • Encrypted database connections via SSL/TLS
  • Self-hosted infrastructure keeps data within your control

Regulatory Compliance Made Simple

Organizations subject to privacy regulations benefit from Umami's compliance-friendly approach:

  • GDPR compliance through cookieless, anonymous tracking
  • CCPA compliance via minimal data collection
  • PECR compliance without consent management overhead
  • ePrivacy Directive satisfaction through privacy-first design

Performance Optimization and Scalability

Lightweight Tracking Script

At just 2KB compressed, the Umami tracking script loads faster than alternatives:

  • Minimal impact on page load performance
  • Asynchronous loading prevents render blocking
  • Edge deployment for global low latency
  • Caching optimization for repeat visitors

Database Performance at Scale

For high-traffic websites, optimize your PostgreSQL configuration:

  1. Enable connection pooling with PgBouncer
  2. Configure appropriate indexes on frequently queried columns
  3. Implement partitioning for time-series data
  4. Use read replicas for analytics queries
  5. Monitor query performance with pg_stat_statements

Horizontal Scaling Strategies

As traffic grows, Umami scales horizontally:

  • Deploy multiple application instances behind load balancers
  • Use Redis for session management across instances
  • Implement database read replicas for query distribution
  • Cache aggregated statistics with Redis or Memcached
  • Deploy edge workers for geographic distribution

Version 3.0 Updates and What's New

The recent v3.0 release introduces significant improvements:

Redesigned User Interface

A completely rebuilt dashboard provides:

  • Cleaner, more intuitive navigation
  • Improved data visualization components
  • Enhanced mobile responsiveness
  • Faster dashboard rendering performance

Advanced Cohort Analysis

Create user cohorts based on behavior patterns:

  • Group visitors by acquisition date
  • Track retention across time periods
  • Compare cohort behavior patterns
  • Measure long-term engagement trends

Enhanced Segmentation

Drill deeper into your analytics with advanced filters:

  • Combine multiple filter criteria
  • Create saved segments for repeated analysis
  • Export segment data for external analysis
  • Share segments across team members

Troubleshooting Common Issues

Database Connection Problems

If Umami fails to connect to PostgreSQL:

# Verify PostgreSQL is running
pg_isready -h localhost -p 5432

# Check connection string format
DATABASE_URL=postgresql://user:pass@host:5432/dbname

# Test connection manually
psql $DATABASE_URL

Tracking Script Not Loading

Common issues preventing script execution:

  • Content Security Policy blocking external scripts
  • Ad blockers interfering with analytics
  • CORS configuration preventing cross-origin requests
  • Incorrect website ID in script tag

Performance Degradation

If your Umami instance slows down:

  1. Analyze slow queries with PostgreSQL logs
  2. Review database indexes on frequently accessed tables
  3. Implement caching for dashboard queries
  4. Upgrade hardware if database is resource-constrained
  5. Archive old data to reduce table sizes

Future Roadmap and Development

Planned Features

The Umami maintainers are working on:

  • Enhanced funnel visualization capabilities
  • Machine learning-powered insights
  • Improved team collaboration features
  • Extended API capabilities for integrations
  • Mobile application analytics support

Community Requests

Popular feature requests from the community include:

  • Heat map visualization for click tracking
  • A/B testing framework integration
  • Custom dimension support for complex tracking
  • Advanced filtering with regex patterns
  • White-label customization options

Platform

GitHub

Language

TypeScript

License

MIT

Stars

33k+

Tags

web-analyticsprivacy-focusedopen-sourceself-hostedtypescriptnextjspostgresqlgdpr-compliantanalytics-platformcookielessreal-time-analyticsevent-trackingdockermit-licensedata-privacy

Frequently Asked Questions

What is Umami and why should I use it instead of Google Analytics?

Umami is an open-source, privacy-focused web analytics platform that provides website insights without cookies or tracking user data. Unlike Google Analytics, Umami doesn't share visitor information with third parties, eliminates GDPR consent requirements, and keeps all analytics data under your complete control through self-hosting. This makes it ideal for developers and organizations prioritizing user privacy while maintaining comprehensive analytics capabilities.

How do I deploy Umami on my own server?

Deploying Umami requires Node.js 18.18+, PostgreSQL 12.14+, and pnpm. Clone the GitHub repository, configure your database connection in a .env file, run database migrations with 'pnpm prisma migrate deploy', build the application with 'pnpm build', and start the server with 'pnpm start'. Alternatively, use Docker with the official image for simplified deployment with docker-compose.

Is Umami truly GDPR compliant without cookie consent banners?

Yes, Umami is GDPR compliant by design because it doesn't use cookies or collect personally identifiable information. The platform anonymizes all visitor data and tracks analytics without creating persistent user identifiers. Since no cookies are set and no personal data is collected, you don't need consent banners or complex compliance procedures required by platforms like Google Analytics.

What are the main differences between Umami v3 and previous versions?

Umami v3 introduces a completely redesigned user interface with enhanced data visualization, advanced cohort analysis for tracking user retention, improved segmentation capabilities with multiple filter criteria, and exclusive PostgreSQL database support (MySQL is no longer supported). The update also brings performance optimizations and new dashboard features focused on providing deeper insights into visitor behavior.

Can I track custom events in Umami for conversion monitoring?

Yes, Umami provides a simple JavaScript API for tracking custom events. Use 'umami.track('event-name', { property: 'value' })' to monitor actions like button clicks, form submissions, purchases, or feature usage. You can also track events using HTML data attributes or implement server-side tracking with available language integrations for comprehensive conversion measurement.

How does Umami perform at scale for high-traffic websites?

Umami scales efficiently through horizontal scaling strategies including multiple application instances behind load balancers, PostgreSQL read replicas for query distribution, Redis caching for aggregated statistics, and connection pooling. The lightweight 2KB tracking script minimizes performance impact, while database optimizations like partitioning and indexing ensure fast queries even with millions of page views.

What hosting platforms work best for deploying Umami?

Umami deploys successfully on various platforms including Vercel for serverless hosting, DigitalOcean App Platform for managed infrastructure, Render for simplified deployment, and self-hosted VPS providers for maximum control. Docker support makes deployment consistent across environments. Choose based on your scaling needs, budget, and infrastructure management preferences.

Can I contribute to the Umami open-source project?

Absolutely! The Umami repository welcomes contributions from the 328+ active contributors. Fork the GitHub repository, create a feature branch for your changes, write tests for new functionality, and submit pull requests with clear descriptions. The MIT license allows you to modify and extend Umami for your specific needs while contributing improvements back to the community.

Visit ProjectView Repository

Share

TwitterFacebookLinkedIn

Related Resources

Perplexica

ToolTypeScript⭐ 10k+

Privacy-focused AI search engine that runs on your hardware. Open source Perplexity alternative with local LLM support, specialized search modes, and complete privacy.

aisearch-engineprivacyopen-sourcellm+5

Uptime Kuma

ToolJavaScript⭐ 50k+

Self-hosted uptime monitoring tool with beautiful UI. Track website uptime, server health, SSL certificates. 90+ notification integrations. Open source alternative to UptimeRobot.

monitoringuptimedevopsself-hosteddocker+5

Mautic

ToolPHP⭐ 10k+

Open source marketing automation platform with email campaigns, lead scoring, and segmentation. Self-hosted alternative to HubSpot and Mailchimp with complete data control.

marketing-automationopen-sourceself-hostedemail-marketinglead-scoring+5