We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4862a14 commit 4b6f43eCopy full SHA for 4b6f43e
src/components/analytics.jsx
@@ -7,7 +7,10 @@ import { usePathname } from 'next/navigation'
7
function SwetrixComponent() {
8
const pathname = usePathname()
9
10
- if (window.location.host === 'briefkastenhq.com') {
+ if (
11
+ typeof window !== 'undefined' &&
12
+ window.location.host === 'briefkastenhq.com'
13
+ ) {
14
Swetrix.init(process.env.NEXT_PUBLIC_SWETRIX_PROJECT, {
15
apiURL: process.env.NEXT_PUBLIC_SWETRIX_API_HOST,
16
})
0 commit comments