From 0a2a2cb305305ea7c178fb54c67bef54cbe6e688 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Sat, 22 Apr 2023 00:26:28 +0200 Subject: [PATCH] support custom URL --- src/tracker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tracker.ts b/src/tracker.ts index 46e48e9..b9ae782 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -117,6 +117,7 @@ export class MatomoLiteTracker { useSendBeacon: boolean = false performanceMetric?: PerformanceMetric userID?: string + customURL?: string browserFeatures?: BrowserFeatures customDimensions?: CustomDimensions requestMethod: "GET" | "POST" = "GET" @@ -136,7 +137,7 @@ export class MatomoLiteTracker { h: now.getHours(), m: now.getMinutes(), s: now.getSeconds(), - url: getCurrentURL(), + url: this.customURL ? this.customURL : getCurrentURL(), send_image: 1 } const referrer = documentAlias.referrer