Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Ensure website id is passed to tracker.
Mike Cao3a6971e17374
diff --git a/src/tracker/index.js b/src/tracker/index.jsindex cc6b8dbbf..97bf3bb06 100644--- a/src/tracker/index.js+++ b/src/tracker/index.js@@ -193,17 +193,21 @@/* Tracking functions */const trackingDisabled = () =>+ !website ||(localStorage && localStorage.getItem('umami.disabled')) ||(domain && !domains.includes(hostname));const send = async (payload, type = 'event') => {if (trackingDisabled()) return;+const headers = {'Content-Type': 'application/json',};+if (typeof cache !== 'undefined') {headers['x-umami-cache'] = cache;}+try {const res = await fetch(endpoint, {method: 'POST',