From 4e0381a5110deac6381cc5313dd8e07003c679d7 Mon Sep 17 00:00:00 2001 From: Alexander Petkov Date: Thu, 30 Nov 2023 19:08:14 +0200 Subject: [PATCH 1/2] Remove legacy hotjar implementation Hotjar is now loaded through the GTM --- public/js/hotJarLib.js | 8 -------- src/common/hotjar/HotJar.tsx | 17 ----------------- src/components/client/index/IndexPage.tsx | 4 ---- 3 files changed, 29 deletions(-) delete mode 100644 public/js/hotJarLib.js delete mode 100644 src/common/hotjar/HotJar.tsx diff --git a/public/js/hotJarLib.js b/public/js/hotJarLib.js deleted file mode 100644 index d8f5c673f..000000000 --- a/public/js/hotJarLib.js +++ /dev/null @@ -1,8 +0,0 @@ -(function (h, o, t, j, a, r) { - h.hj = h.hj || function () { (h.hj.q = h.hj.q || []).push(arguments) } - h._hjSettings = { hjid: 3572956, hjsv: 6 }; - a = o.getElementsByTagName('head')[0]; - r = o.createElement('script'); r.async = 1; - r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv; - a.appendChild(r); -})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=%27') diff --git a/src/common/hotjar/HotJar.tsx b/src/common/hotjar/HotJar.tsx deleted file mode 100644 index 0d84eb2bb..000000000 --- a/src/common/hotjar/HotJar.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Script from 'next/script' -import getConfig from 'next/config' - -interface HotJar extends Window { - hj: object -} - -declare const window: HotJar - -export default function HotJar() { - const { publicRuntimeConfig } = getConfig() - - if (typeof window !== undefined && typeof window.hj === 'function') { - return null - } - return