Skip to content

Commit 592c9e0

Browse files
remove route groups
1 parent b1bf49e commit 592c9e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/actions/analytics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ export type TrackEventArgs = { name: string; data?: object };
5959
export const trackEvent = (eventArgs?: string | TrackEventArgs): void => {
6060
if (!eventArgs || ENV.TEST) return;
6161

62-
const path = page.route.id ?? '';
62+
const path = page.route.id?.replace(/\(([^()]*)\)/g, '') ?? '';
63+
console.log(path);
6364
const name = typeof eventArgs === 'string' ? eventArgs : eventArgs.name;
6465
const data = typeof eventArgs === 'string' ? { path } : { ...eventArgs.data, path };
6566

0 commit comments

Comments
 (0)