
Umami Has a Free API: Privacy-First Web Analytics That Replaces Google Analytics
What is Umami? Umami is a privacy-focused, open-source web analytics tool. No cookies, no tracking, GDPR-compliant by default. It's the ethical alternative to Google Analytics — self-hosted with a clean API. Quick Setup git clone https://github.com/umami-software/umami cd umami npm install npx prisma migrate deploy npm run build npm start Or use Docker: docker compose up -d Add to Your Website <script async src= "https://your-umami.com/script.js" data-website-id= "YOUR_WEBSITE_ID" ></script> One tag. No cookies. No consent banner needed. The REST API export UMAMI_URL = "https://your-umami.com/api" export UMAMI_TOKEN = "your-api-token" Get Website Stats curl -s " $UMAMI_URL /websites/WEBSITE_ID/stats?startAt=1711584000000&endAt=1711670400000" \ -H "Authorization: Bearer $UMAMI_TOKEN " Response: { "pageviews" : { "value" : 1234 , "prev" : 1100 }, "visitors" : { "value" : 890 , "prev" : 800 }, "visits" : { "value" : 950 , "prev" : 850 }, "bounces" : { "value" : 312 , "prev" : 290 }, "tota
Continue reading on Dev.to
Opens in a new tab


