Menu
On this page
Vercel is the company behind the framework Next.js which is used by Umami. They also provide a free hosting service which is ideal for Next.js applications.
If you don't already have a database, you can create a Vercel Postgres database integration. You can also follow the Running on DigitalOcean guide or the Running on PlanetScale guide to get a database up and running. You can also check out the Managed databases section under Hosting.
Automate steps 1-5 using the button above
DATABASE_URL
to your Vercel project. These values are defined in the
Configure Umami step from Install. You can also create a Vercel Postgres database at this point.POSTGRES_PRISMA_URL
for umami, which is in the form of postgres://user:passwd@endpoint-pooler.postgres.vercel-storage.com/verceldb?pgbouncer=true&connect_timeout=10
.db/postgresql/prisma.schema
file.<deploy-id>.vercel.app
.Optionally, you can proxy Umami Analytics to serve Umami Analytics from your main domain. This is also useful for bypassing ad-blocker when using Umami Cloud.
See Vercel's rewrites docs.
In the root of your project, add the vercel.json
file with the following contents:
{
"rewrites": [
{
"source": "/stats/:match*",
"destination": "https://analytics.umami.is/:match*"
}
]
}
The tracking code script tag should use /stats/script.js
as src
value:
<script
defer
src="/stats/script.js"
data-website-id="94db1cb1-74f4-4a40-ad6c-962362670409"
></script>