Guide
Umami Cloud vs self-hosted Umami on WordPress
WordPress connects to Umami Cloud and to a self-hosted Umami in the same way: one script tag for tracking and, if you want stats inside WordPress, the Umami API. Only the addresses and the credentials differ.
Short answer
WordPress connects to Umami Cloud and to self-hosted Umami in the same way; only the addresses and credentials differ. Umami Cloud loads the tracker from https://cloud.umami.is/script.js and serves its API at https://api.umami.is/v1, with an API key. Self-hosted Umami uses https://your-umami-host/script.js and https://your-umami-host/api, with an API key or a username and password, and lets you rename the script and endpoint.
Umami Cloud and self-hosted Umami compared
The differences that matter when you connect a WordPress site.
| Umami Cloud | Self-hosted Umami | |
|---|---|---|
| Tracking script URL | https://cloud.umami.is/script.js | https://your-umami-host/script.js, unless you renamed it |
| Where the tracker sends data | https://gateway.umami.is/api/send | /api/send on the host that serves the script |
| API address | https://api.umami.is/v1 | https://your-umami-host/api |
| API sign-in | API key only | API key, or username and password |
| API rate limit | 50 calls per 15 seconds for each API key | The Umami Cloud limit does not apply |
| Environment variables | Not available | TRACKER_SCRIPT_NAME, COLLECT_API_ENDPOINT, BASE_PATH, IGNORE_IP and others |
| Who hosts and updates Umami | Umami Software, Inc. | You |
| Where the data is stored | On Umami Cloud | On your own server |
Source: Umami's documentation, November 2026.
What is the same on both
The tracking code has the same shape: a script tag with a src (the script URL) and a data-website-id. Pageviews, umami.track and data-umami-event attributes behave the same way, so the other guides on this site apply to both. In Umami, the two values are under Websites → Edit → Tracking code.
<!-- Umami Cloud -->
<script defer src="https://cloud.umami.is/script.js" data-website-id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>
<!-- Self-hosted Umami -->
<script defer src="https://your-umami-host/script.js" data-website-id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>API address and sign-in
You need the API only to read stats outside Umami, for example in a WordPress dashboard widget. Tracking works without it.
- Umami Cloud. The API is at
https://api.umami.is/v1and API keys are the only way to sign in. Create one in Umami: click your profile button, then Settings → API keys → Create key. Send it as anAuthorization: Bearerheader. Each key is limited to 50 calls every 15 seconds. - Self-hosted Umami. The API is at
https://your-umami-host/api. Use an API key if your version has Settings → API keys. Otherwise send a username and password to/api/auth/login; Umami answers with a token for the sameAuthorization: Bearerheader. A user with two-factor authentication also needs a one-time code, which an unattended server cannot supply, so use an API key for that user.
# Umami Cloud: list your websites with an API key.
curl https://api.umami.is/v1/websites \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR-API-KEY"
# Self-hosted Umami: log in, then use the token from the response.
curl -X POST https://your-umami-host/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"your-username","password":"your-password"}'
curl https://your-umami-host/api/websites \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR-TOKEN"Self-hosted settings that change the WordPress setup
These are environment variables on the Umami server, so they do not exist on Umami Cloud.
| Variable | What it does | What changes in WordPress |
|---|---|---|
TRACKER_SCRIPT_NAME | Serves the tracker under another name than script.js, for example stats.js. | The script URL becomes https://your-umami-host/stats.js. |
COLLECT_API_ENDPOINT | Receives data on another route than /api/send. | Nothing. The tracker calls the new route by itself. |
BASE_PATH | Hosts Umami under a subdirectory such as /analytics. It is applied when Umami is built. | Add the subdirectory to the script URL and to the API address. |
IGNORE_IP | Ignores visits from the listed IP addresses and CIDR ranges. | Nothing. It keeps an office or home address out of your stats. |
TRACKER_SCRIPT_NAME=stats.js
COLLECT_API_ENDPOINT=/api/x
IGNORE_IP=203.0.113.10,198.51.100.0/24Ad blockers, proxying and data-host-url
Ad blockers can block the Umami script or the address it sends data to. Umami's documented fix is to serve both from your own domain.
- Umami Cloud. On your web server, proxy one path (for example
/stats.js) tohttps://cloud.umami.is/script.jsand/api/sendtohttps://gateway.umami.is/api/send. Then setdata-host-urlto your own domain, so the tracker posts there instead of togateway.umami.is. - Self-hosted Umami. Rename the script and the endpoint with
TRACKER_SCRIPT_NAMEandCOLLECT_API_ENDPOINT. You needdata-host-urlonly when the script is served from a different host than Umami itself, such as a CDN.
Proxying is configured on the web server (Nginx, Apache or similar), so you need access to its configuration.
<script defer src="https://example.com/stats.js" data-host-url="https://example.com" data-website-id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"></script>What to enter in Connect for Umami
All of these fields are under Settings → WPUmami.
| Field | Umami Cloud | Self-hosted Umami |
|---|---|---|
| Umami website ID (Tracking tab) | The data-website-id from your tracking code | The data-website-id from your tracking code |
| Umami script URL (Tracking tab) | https://cloud.umami.is/script.js | https://your-umami-host/script.js, or the renamed script |
| Host URL (Tracking tab, advanced) | Blank. If you proxy the script, your own domain | Blank, unless the script is served from another host than Umami |
| Umami API URL (Dashboard tab) | Blank: Umami Cloud is detected from the script URL. If you proxy the script, https://api.umami.is/v1 | Blank to reuse the script host. With BASE_PATH, your instance address including the subdirectory |
| API key (Dashboard tab) | Needed for the dashboard widget | Recommended, if your version has API keys |
| Username and Password (Dashboard tab) | Leave blank | Only if you have no API key |
How to connect WordPress to Umami Cloud or self-hosted Umami
The steps are the same for both. Only the values differ.
Copy your tracking details from Umami
In Umami, go to Websites, click Edit next to your site and open Tracking code. Note the script URL (the
src) and the website ID (thedata-website-id).Add the tracker to WordPress
With Connect for Umami, paste both values on the Tracking tab under Settings → WPUmami and save. Without the plugin, use one of the manual methods in how to add Umami to WordPress.
Create an API key in Umami
Only needed for stats inside WordPress. In Umami, click your profile button, then Settings → API keys → Create key. On a self-hosted version without API keys, create a view-only user instead.
Enter the API details
On the Dashboard tab, paste the API key, or the username and password for self-hosted Umami. Leave Umami API URL blank unless the table above says otherwise, then save.
Check the status panel
The panel at the top of the settings screen has two lines, Tracking script and Stats API. When both work it reads Connected to Umami and names the website it is reading.
Version requirements on self-hosted Umami
Connect for Umami works with self-hosted Umami v2 and v3. Some Umami features need a minimum version: data-tag needs 2.11, the Revenue report 2.14, data-do-not-track 2.17 and Core Web Vitals (data-performance) 3.1. If a feature is missing on a self-hosted instance, check its version first.
Frequently asked questions
What is the Umami script URL for Umami Cloud?
It is https://cloud.umami.is/script.js. On a self-hosted instance it is usually https://your-umami-host/script.js, unless the script was renamed with TRACKER_SCRIPT_NAME or Umami runs under a subdirectory.
What is the Umami API URL for self-hosted Umami?
The address of your instance followed by /api, for example https://your-umami-host/api. Umami Cloud is different: its API is at https://api.umami.is/v1. In Connect for Umami you can leave the API URL blank for both, unless Umami runs under a subdirectory or the script is proxied.
Can I use my username and password with the Umami Cloud API?
No. On Umami Cloud, API keys are the only way to authenticate. Create one under Settings → API keys. Logging in through /api/auth/login is for self-hosted Umami.
Does the Umami Cloud API have a rate limit?
Yes. Each Umami Cloud API key is limited to 50 calls every 15 seconds. Connect for Umami calls the API from your WordPress server and caches the results for five minutes.
How do I stop ad blockers from blocking Umami on WordPress?
Serve the script and the collection endpoint from your own domain. With Umami Cloud, proxy both on your web server and set data-host-url. With self-hosted Umami, rename them with TRACKER_SCRIPT_NAME and COLLECT_API_ENDPOINT. In Connect for Umami, data-host-url is the Host URL field on the Tracking tab.
Connect WordPress to Umami in about two minutes
One plugin: the tracking script, events, store revenue and your stats inside WordPress. Plans start at $12 a year, with a 14-day money-back guarantee.