From 4862a1485bd3c66aac1c39edd143e2c0c855e5d3 Mon Sep 17 00:00:00 2001 From: ndom91 Date: Thu, 11 Jul 2024 13:11:54 +0200 Subject: [PATCH] fix: use only pathname --- src/components/analytics.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/analytics.jsx b/src/components/analytics.jsx index 9e84203..486e929 100644 --- a/src/components/analytics.jsx +++ b/src/components/analytics.jsx @@ -2,20 +2,16 @@ import * as Swetrix from 'swetrix' import { Suspense } from 'react' -import { usePathname, useSearchParams } from 'next/navigation' +import { usePathname } from 'next/navigation' function SwetrixComponent() { const pathname = usePathname() - const searchParams = useSearchParams() if (window.location.host === 'briefkastenhq.com') { Swetrix.init(process.env.NEXT_PUBLIC_SWETRIX_PROJECT, { apiURL: process.env.NEXT_PUBLIC_SWETRIX_API_HOST, }) let url = pathname - if (searchParams.toString() !== '') { - url += `?${searchParams.toString()}` - } Swetrix.trackPageview(url) } return