Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

How to Troubleshoot Umami Tracking Scripts, Missing Events, and Incorrect Pageviews

A step-by-step guide to finding why Umami scripts, pageviews, or custom events are missing, duplicated, or sent to the wrong instance.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Umami is missing visits or events—or recording duplicate pageviews—start with the browser’s Network tab. Check whether the tracker loads, whether collection requests reach the intended Umami instance, and then inspect hostname filters, SPA route handling, and event code. This sequence helps identify which layer is failing before you change settings.

Check whether the tracker and collection requests are working

  1. Open your browser’s developer tools and select Network. Reload the page and look for the Umami tracker script and requests to your Umami instance. Umami’s tracker configuration guide recommends confirming that the script loads without errors; an ad blocker may prevent it from loading.
  2. Interpret what is missing. If there is no tracker request, investigate the installation, script URL, framework integration, or blocking. If the script loads but collection requests are absent, check runtime configuration, the destination URL, network policy, and blockers. This distinction is a diagnostic inference from Umami’s documented checks.
  3. Verify where the script is installed. Umami’s collection guide describes installing the tracking code in the document head. For Next.js, it specifically calls out using the Next.js Script component. Follow the guidance for your framework rather than inserting the script repeatedly in individual pages.

If the request is present, inspect its destination and response in Network. A successful script download alone does not prove that pageview or event data is being accepted by the intended Umami deployment.

As an Amazon Associate I earn from qualifying purchases.

Check the hostname filter and Umami destination

If the tracker tag uses data-domains, compare its configured values with the exact hostname in the browser address bar. Umami checks this setting against window.location.hostname; for example, example.com and www.example.com are different hostnames and may both need to be included if visitors use both.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If data-host-url is set, make sure it points to the intended Umami deployment. Without that setting, the tracker sends data to the location from which the script was served. The tracker configuration reference also documents separate controls for automatic tracking and automatic pageviews, along with options to exclude search or hash values from collected URLs.

Fix missing or duplicate pageviews in a single-page app

Umami’s tracker functions documentation says its tracker monitors History API pushState and replaceState, as well as popstate, to record navigation pageviews in single-page applications (SPAs). Load the tracker once in the app’s root layout or shared document head. Do not add another copy on every route.

When automatic pageviews are enabled

Let the tracker record route changes. Avoid calling umami.track() with no arguments from a route-change hook: Umami warns that doing so can add a second pageview for the same navigation.

When the application should control pageviews

Disable only automatic pageview collection with data-auto-pageview="false", then send pageviews manually with umami.track() as appropriate. This setting is documented as available since Umami v3.2.0. It is different from data-auto-track="false", which disables tracker initialization more broadly; choose the setting that matches the intended behavior. Manual pageview tracking is documented from v2.0.0. See Umami’s configuration reference and tracker functions guide for the relevant options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find why custom events are missing

Umami supports event tracking from v2.0.0. Add a data-umami-event attribute to the element being tracked, or call umami.track('event-name', data) in JavaScript. An event needs a name: Umami does not accept event data without one, and event names are limited to 50 characters.

Using an HTML data attribute

For a simple interaction, put the event name on the target element with data-umami-event. Data attributes save event properties as strings. If you need values to keep types such as numbers or booleans, send the event from JavaScript instead.

Using JavaScript

Call umami.track('event-name', data) from the code that handles the interaction. If the event is absent, confirm that the click handler or component actually runs, that the event name is present, and that the browser sends the resulting request to the correct Umami host. Umami documents both approaches in its tracker functions guide.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When blockers prevent tracking

Ad blockers and similar tools may block either the tracker script or the collection endpoint, so identify which request is affected before changing the setup. Umami documents proxying the script and collection path through your site’s domain as an option. For self-hosted deployments, it also documents configuring TRACKER_SCRIPT_NAME and COLLECT_API_ENDPOINT; see its collection guide and tracker proxy guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Umami also describes serving a copy of the tracker script from your own domain. Its documentation warns that this is less reliable than proxying and that the copy must be updated as the tracker changes. The available configuration and implementation depend on whether you use Umami Cloud or self-host Umami; consult the relevant guide for your deployment rather than assuming the self-hosted environment variables apply to Cloud.

Use the symptom to choose the next check

Symptom First check Likely area to investigate
No tracker request in Network Confirm the script is installed and its URL is correct. Installation, framework loading, or blocking.
Tracker loads, but no collection request appears Check data-auto-track, the configured host, and whether a blocker or network policy stops the request. Runtime configuration or collection connectivity.
Some hostnames record data but others do not Compare the current hostname, including www, with data-domains. Hostname filtering.
SPA navigation is missing or counted twice Check that the script is loaded once and whether a route hook also calls no-argument umami.track(). Overlapping automatic and manual pageview logic.
Pageviews appear but a custom interaction is missing Confirm the handler runs and the event name is included. Event implementation or request delivery.

The checks above follow Umami’s documentation for tracker configuration, collection, tracker functions, and proxying. Feature-version notes describe when the documentation says a capability was introduced; they do not establish which version a particular site has installed.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.