Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

getRefferer improvement

Blue Mouse6b422c7e6de1
diff --git a/src/utils.ts b/src/utils.ts
index 18f3dc949..70b54dc2e 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -33,8 +33,8 @@ export const getTimezone = () => {
}
}
-export const getRefferer = () => {
- return document.referrer
+export const getRefferer = (): string | undefined => {
+ return document.referrer || undefined
}
export const getUTMSource = () => findInSearch(utmSourceRegex)