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.
1 parent b1bf49e commit 592c9e0Copy full SHA for 592c9e0
src/lib/actions/analytics.ts
@@ -59,7 +59,8 @@ 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
+ console.log(path);
64
const name = typeof eventArgs === 'string' ? eventArgs : eventArgs.name;
65
const data = typeof eventArgs === 'string' ? { path } : { ...eventArgs.data, path };
66
0 commit comments