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.

Last updated

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 CloudSelf-hosted Umami
Tracking script URLhttps://cloud.umami.is/script.jshttps://your-umami-host/script.js, unless you renamed it
Where the tracker sends datahttps://gateway.umami.is/api/send/api/send on the host that serves the script
API addresshttps://api.umami.is/v1https://your-umami-host/api
API sign-inAPI key onlyAPI key, or username and password
API rate limit50 calls per 15 seconds for each API keyThe Umami Cloud limit does not apply
Environment variablesNot availableTRACKER_SCRIPT_NAME, COLLECT_API_ENDPOINT, BASE_PATH, IGNORE_IP and others
Who hosts and updates UmamiUmami Software, Inc.You
Where the data is storedOn Umami CloudOn 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.

The tracking code for each setup (use one, not both)
<!-- 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/v1 and 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 an Authorization: Bearer header. 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 same Authorization: Bearer header. 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.
Test the Umami API from a terminal
# 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.

VariableWhat it doesWhat changes in WordPress
TRACKER_SCRIPT_NAMEServes the tracker under another name than script.js, for example stats.js.The script URL becomes https://your-umami-host/stats.js.
COLLECT_API_ENDPOINTReceives data on another route than /api/send.Nothing. The tracker calls the new route by itself.
BASE_PATHHosts 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_IPIgnores visits from the listed IP addresses and CIDR ranges.Nothing. It keeps an office or home address out of your stats.
Example environment variables on a self-hosted Umami server
TRACKER_SCRIPT_NAME=stats.js
COLLECT_API_ENDPOINT=/api/x
IGNORE_IP=203.0.113.10,198.51.100.0/24

Ad 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) to https://cloud.umami.is/script.js and /api/send to https://gateway.umami.is/api/send. Then set data-host-url to your own domain, so the tracker posts there instead of to gateway.umami.is.
  • Self-hosted Umami. Rename the script and the endpoint with TRACKER_SCRIPT_NAME and COLLECT_API_ENDPOINT. You need data-host-url only 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.

Umami Cloud loaded through a proxy on your own domain
<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.

FieldUmami CloudSelf-hosted Umami
Umami website ID (Tracking tab)The data-website-id from your tracking codeThe data-website-id from your tracking code
Umami script URL (Tracking tab)https://cloud.umami.is/script.jshttps://your-umami-host/script.js, or the renamed script
Host URL (Tracking tab, advanced)Blank. If you proxy the script, your own domainBlank, 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/v1Blank to reuse the script host. With BASE_PATH, your instance address including the subdirectory
API key (Dashboard tab)Needed for the dashboard widgetRecommended, if your version has API keys
Username and Password (Dashboard tab)Leave blankOnly 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.

  1. 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 (the data-website-id).

  2. 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.

  3. 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.

  4. 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.

  5. 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.

See pricing