In this page, we will see how to setup Umami for an application.
You can self host Umami yourself or use the Umami cloud.
To-do list
We assume that you already have your NEXT_PUBLIC_UMAMI_HOST, corresponding to the host of your Umami instance.
You will need to get your UMAMI_WEBSITE_ID token. Here are the steps to get it:
Once logged in, go to the website page.
Click on the Tracking code tab, .
You should see a script tag looking like this:
<script
async
src="your-NEXT_PUBLIC_UMAMI_HOST"
data-website-id="your-UMAMI_WEBSITE_ID"
></script>Copy paste the following values in your environment variables.
The following values are the ones you should use in your NEXT_PUBLIC_UMAMI_HOST and UMAMI_WEBSITE_ID environment variables.
| Attribute | Value |
|---|---|
src | NEXT_PUBLIC_UMAMI_HOST |
data-website-id | UMAMI_WEBSITE_ID |
Useful links
Environment variables
# ============================================
# 📊 ANALYTICS
# ============================================
# For Umami
NEXT_PUBLIC_UMAMI_HOST=https://your-umami-instance.com
NEXT_PUBLIC_UMAMI_WEBSITE_ID=1234567890
NEXT_PUBLIC_UMAMI_DISABLE_LOCALHOST_TRACKING=trueGoogle Analytics
Setup Google Analytics for your project.
Monitoring
Tools to monitor your application, to track errors and events.
How is this guide?
Last updated on 10/17/2025