Umami Integration
Umami is an open-source, privacy-friendly website analytics tool available as a hosted cloud service or self-hosted. It’s easy to deploy and has a clean dashboard.
Good to know
- NEXTY.DEV disables tracking scripts in development to avoid polluting analytics data.
- To verify locally, open
app/[locale]/layout.tsxand remove theprocess.env.NODE_ENV === "development"check.- If you don’t need local verification, just set the production environment variables and the scripts will be enabled automatically.
Step 1: Create a website in Umami and get the Website ID
- Sign in to the Umami dashboard
- Go to Websites / Settings and create a new website
- Copy the Website ID (usually a UUID)
Step 2: Add environment variables
.env
NEXT_PUBLIC_UMAMI_SRC=https://your-umami.com/script.js
NEXT_PUBLIC_UMAMI_WEBSITE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx