Skip to main content
Umami is a simple, fast, privacy-focused alternative to Google Analytics. The tracking script is lightweight and automatically collects essential analytics data while respecting user privacy.

How It Works

The Umami tracker is a lightweight JavaScript snippet that runs in your visitors’ browsers. It automatically tracks page views and can be configured to track custom events.

Automatic Tracking

Page views are tracked automatically when the script loads and on navigation changes in single-page applications.

Event Tracking

Track user interactions like button clicks, form submissions, and custom events using HTML attributes or JavaScript.

User Identification

Identify users and track their journey across sessions with the identify function.

Privacy First

Respects Do Not Track settings, no cookies required, and all data is anonymized.

What Data Is Collected

Umami automatically collects the following information on each page view:
PropertyDescriptionExample
hostnameThe website’s hostnameanalytics.umami.is
languageBrowser languageen-US, fr-FR
referrerPage referrer URLhttps://google.com
screenScreen dimensions1920x1080
titlePage titleGetting Started - Umami
urlCurrent page URL/docs/getting-started
websiteYour website IDb59e9c65-ae32-47f1-8400-119fcf4861c4
All data is extracted from the browser’s standard APIs (window.location, window.navigator, window.screen) and does not include any personally identifiable information.

Privacy Features

Umami is built with privacy as a core principle:
Umami doesn’t use cookies, so there’s no need for annoying cookie banners or consent forms.
All data collected is anonymized. No personal information like IP addresses is stored.
The tracker respects the Do Not Track (DNT) browser setting when configured with the data-do-not-track attribute.
Umami is designed to be GDPR compliant out of the box, with no personal data collection.

Core Features

Automatic Page View Tracking

Once installed, the tracker automatically:
  • Records page views on initial load
  • Tracks navigation in single-page applications (SPAs)
  • Monitors URL changes via History API

Custom Event Tracking

Track user interactions in two ways:
Add tracking to any element without writing JavaScript:
<button data-umami-event="signup-button">Sign Up</button>

User Identification

Track users across sessions and associate events with specific users:
umami.identify({ userId: '123', plan: 'premium' });

Getting Started

1

Install the tracking script

Add the Umami script tag to your website’s HTML.Learn more about script installation →
2

Configure tracking options

Customize the tracker behavior with data attributes.View all configuration options →
3

Track custom events

Add event tracking to capture user interactions.Learn about event tracking →

Next Steps

Script Installation

Learn how to install the tracking script on your website

Tracker Configuration

Customize tracker behavior with configuration options

Event Tracking

Track custom events and user interactions

Tracker Functions

Use the JavaScript API for advanced tracking

Build docs developers (and LLMs) love