diff --git a/src/hooks/eventLogger.ts b/src/hooks/eventLogger.ts index 5040ee6af61..606fdeb0bfa 100644 --- a/src/hooks/eventLogger.ts +++ b/src/hooks/eventLogger.ts @@ -8,17 +8,17 @@ interface EventArguments { } export const useEventLogger = (): void => { - useEffect(() => { + useEffect(() => { const eventArguments: EventArguments = { path: location.pathname } const urlSearchParameters = new URLSearchParams(location.search) const utmParameters: string[] = ['utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content'] - + for (const parameter of utmParameters) { if (urlSearchParameters.has(parameter)) { eventArguments[parameter] = urlSearchParameters.get(parameter) } } - + const eventLogger = new EventLogger('https://sourcegraph.com') eventLogger?.log('ViewStaticPage', eventArguments, eventArguments) }) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 8175f3d5978..df49fea4ffa 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -17,8 +17,12 @@ const App = ({ Component, pageProps }: AppProps): ReactNode => { {/* // Import all top-level scripts here: https://nextjs.org/docs/messages/no-script-in-document-page */} - {/* Add Triblio "Webpage Personalization Script" for Sales/Marketing */} - + {/* Drift */} + + + {/* Clearbit script for Hubspot form enrichment */} +