From 7680ae40b4e621838bb238f9b3cde437c327bf37 Mon Sep 17 00:00:00 2001 From: afred Date: Wed, 11 Dec 2024 12:32:38 +0800 Subject: [PATCH] change owner --- app/components/HotjarLoader.tsx | 34 +++++++++++++++++++++++++++++++++ app/page.tsx | 33 ++++++++------------------------ 2 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 app/components/HotjarLoader.tsx diff --git a/app/components/HotjarLoader.tsx b/app/components/HotjarLoader.tsx new file mode 100644 index 000000000..64e6b676b --- /dev/null +++ b/app/components/HotjarLoader.tsx @@ -0,0 +1,34 @@ +"use client"; + +import { useEffect } from "react"; + +export default function HotjarLoader() { + useEffect(() => { + // Hotjar Tracking Code + (function (h, o, t, j, a, r) { + h.hj = + h.hj || + function () { + (h.hj.q = h.hj.q || []).push(arguments); + }; + h._hjSettings = { hjid: 3414362, hjsv: 6 }; + + // 获取 元素 + a = o.getElementsByTagName("head")[0]; + if (!a) { + console.error("Head element not found in the document."); + return; + } + + // 创建