mirror of
https://github.com/XFox111/my-website.git
synced 2026-04-22 07:28:01 +03:00
fix: cookie consent tracking breaks when CDN caching is involved
This commit is contained in:
+2
-1
@@ -30,7 +30,8 @@
|
||||
/** @type {string | undefined} */
|
||||
const id = document.getElementById("ms-clarity")?.dataset.id;
|
||||
|
||||
if (!id)
|
||||
// If "Do Not Track" is enabled, or there's no CLARITY_ID set up, we don't load any analytics
|
||||
if (!id || navigator.doNotTrack === "1")
|
||||
return;
|
||||
|
||||
window["clarity"] ??= function ()
|
||||
|
||||
Reference in New Issue
Block a user