📈 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
send additional data along with the custom event
Blue Mouseae5d2a924296
diff --git a/src/Lib.ts b/src/Lib.tsindex d91f544fe..0e0dde23a 100644--- a/src/Lib.ts+++ b/src/Lib.ts@@ -75,6 +75,7 @@ export class Lib {private pageData: PageData | null = nullprivate pageViewsOptions: PageViewsOptions | null | undefined = nullprivate perfStatsCollected: Boolean = false+ private activePage: string | null = nullconstructor(private projectID: string, private options?: LibOptions) {this.trackPathChange = this.trackPathChange.bind(this)@@ -88,6 +89,13 @@ export class Lib {const data = {pid: this.projectID,+ pg: this.activePage,+ lc: getLocale(),+ tz: getTimezone(),+ ref: getReferrer(),+ so: getUTMSource(),+ me: getUTMMedium(),+ ca: getUTMCampaign(),...event,}this.sendRequest('custom', data)@@ -210,6 +218,7 @@ export class Lib {if (this.checkIgnore(pg)) return+ this.activePage = pgconst perf = this.getPerformanceStats()const data = {