We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8656549 + 68b9b03 commit 5e3dc1bCopy full SHA for 5e3dc1b
src/lib/actions/analytics.ts
@@ -59,7 +59,7 @@ export type TrackEventArgs = { name: string; data?: object };
59
export const trackEvent = (eventArgs?: string | TrackEventArgs): void => {
60
if (!eventArgs || ENV.TEST) return;
61
62
- const path = page.route.id ?? '';
+ const path = page.route.id?.replace(/\(([^()]*)\)/g, '') ?? '';
63
const name = typeof eventArgs === 'string' ? eventArgs : eventArgs.name;
64
const data = typeof eventArgs === 'string' ? { path } : { ...eventArgs.data, path };
65
0 commit comments