📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
renamed getRefferer & other minor syntax improvements
Blue Mouse43378fd887db
diff --git a/src/Lib.ts b/src/Lib.tsindex ec311de03..ed9cacd98 100644--- a/src/Lib.ts+++ b/src/Lib.ts@@ -1,14 +1,6 @@import {- isInBrowser,- isLocalhost,- isAutomated,- getLocale,- getTimezone,- getRefferer,- getUTMCampaign,- getUTMMedium,- getUTMSource,- getPath,+ isInBrowser, isLocalhost, isAutomated, getLocale, getTimezone, getReferrer,+ getUTMCampaign, getUTMMedium, getUTMSource, getPath,} from './utils'/**@@ -19,7 +11,7 @@ interface Map<T> {}export interface LibOptions {- // When set to `true`, all libraries logs (including possible errors) will be+ // When set to `true`, all tracking logs will be// printed to console and localhost events will be sent to server.debug?: boolean@@ -117,7 +109,7 @@ export class Lib {ev: 'pageviews',lc: getLocale(),tz: getTimezone(),- ref: getRefferer(),+ ref: getReferrer(),so: getUTMSource(),me: getUTMMedium(),ca: getUTMCampaign(),@@ -166,4 +158,4 @@ export class Lib {body: JSON.stringify(body),})}-}\ No newline at end of file+}diff --git a/src/utils.ts b/src/utils.tsindex 70b54dc2e..f848d444d 100644--- a/src/utils.ts+++ b/src/utils.ts@@ -1,5 +1,3 @@-const ua = navigator.userAgent || ''-const findInSearch = (exp: RegExp): string | undefined => {const res = location.search.match(exp)return (res && res[2]) || undefined@@ -33,7 +31,7 @@ export const getTimezone = () => {}}-export const getRefferer = (): string | undefined => {+export const getReferrer = (): string | undefined => {return document.referrer || undefined}