[ENG-857] Fix telemetry regex (#1050)

* fix regex

* change back to `replace`
This commit is contained in:
jake authored and GitHub committed 2023-06-29 02:56:14 +00:00
1 parent 5d49c8a74a
commit 7bb107d840
1 file changed
+2 -2
+2 -2
View File
@@ -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
*/