mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-06 04:22:07 +00:00
remove route groups
This commit is contained in:
@@ -59,7 +59,8 @@ export type TrackEventArgs = { name: string; data?: object };
|
||||
export const trackEvent = (eventArgs?: string | TrackEventArgs): void => {
|
||||
if (!eventArgs || ENV.TEST) return;
|
||||
|
||||
const path = page.route.id ?? '';
|
||||
const path = page.route.id?.replace(/\(([^()]*)\)/g, '') ?? '';
|
||||
console.log(path);
|
||||
const name = typeof eventArgs === 'string' ? eventArgs : eventArgs.name;
|
||||
const data = typeof eventArgs === 'string' ? { path } : { ...eventArgs.data, path };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user