From 99deb4bd1c115b5b11f3632ca57ccc4d41fb3ee9 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Sun, 28 Sep 2025 11:34:33 +0800 Subject: remove: umami web analytics integration Stopped tracking visitors because I realized that: 1. It's no necessary for personal blogs to analyze user behaviors, 2. Checking pageviews on a daily basis really messed up my mental health. --- layouts/_partials/scripts/action-menu-js.html | 4 ---- layouts/_partials/scripts/aplayer-js.html | 3 --- 2 files changed, 7 deletions(-) (limited to 'layouts/_partials/scripts') diff --git a/layouts/_partials/scripts/action-menu-js.html b/layouts/_partials/scripts/action-menu-js.html index e91b71f4..df1c498c 100644 --- a/layouts/_partials/scripts/action-menu-js.html +++ b/layouts/_partials/scripts/action-menu-js.html @@ -128,10 +128,6 @@ function initializeLikes(pageId) { window.sendLike = async function(pageId) { if (localStorage.getItem("liked_" + pageId)) return; - if (window.location.hostname !== 'localhost' && typeof umami !== 'undefined') { - umami.track('👍 Hit Like Button'); - } - try { const response = await fetch("https://like.guhub.cn/like/" + pageId, { method: "POST" }); const data = await response.json(); diff --git a/layouts/_partials/scripts/aplayer-js.html b/layouts/_partials/scripts/aplayer-js.html index 4d51ab63..e777b0c9 100644 --- a/layouts/_partials/scripts/aplayer-js.html +++ b/layouts/_partials/scripts/aplayer-js.html @@ -34,9 +34,6 @@ document.addEventListener("DOMContentLoaded", function () { }] }); - ap.on('play', () => umami?.track?.('🎵 Play music with aPlayer')); - ap.on('ended', () => umami?.track?.('🎵 Played entiresong with aPlayer')); - obs.unobserve(el); }); } -- cgit v1.2.3