From 7bb107d84076d30663e8d07487f646f0106df79f Mon Sep 17 00:00:00 2001 From: jake <77554505+brxken128@users.noreply.github.com> Date: Thu, 29 Jun 2023 03:56:14 +0100 Subject: [PATCH] [ENG-857] Fix telemetry regex (#1050) * fix regex * change back to `replace` --- packages/client/src/hooks/usePlausible.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/hooks/usePlausible.tsx b/packages/client/src/hooks/usePlausible.tsx index 4d5abfca3..c9f569b6e 100644 --- a/packages/client/src/hooks/usePlausible.tsx +++ b/packages/client/src/hooks/usePlausible.tsx @@ -191,7 +191,7 @@ const submitPlausibleEvent = async ({ event, debugState, ...props }: SubmitEvent }, options: { deviceWidth: props.screenWidth ?? window.screen.width, - // referrer: '', // TODO(brxken128): see if we could have this blank to prevent accidental IP logging + referrer: '', ...('plausibleOptions' in event ? event.plausibleOptions : undefined) }, callback: debugState.telemetryLogging @@ -294,7 +294,7 @@ const PageViewRegexRules: [RegExp, string][] = [ /** * This is for removing the library UUID from the current path */ - [RegExp('/[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}'), ''], + [RegExp('/[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}', 'g'), ''], /** * This is for removing location IDs from the current path */