From d0356889391fadcacddc1938becb5765ea213a3b Mon Sep 17 00:00:00 2001 From: Marc Date: Mon, 14 Aug 2023 15:29:10 +0200 Subject: [PATCH] fjern sidevisning metrikk (#475) --- src/metrics/PageViewMetricCollector.tsx | 14 -------------- src/metrics/amplitude-utils.ts | 4 ---- src/view/AppBody.tsx | 2 -- 3 files changed, 20 deletions(-) delete mode 100644 src/metrics/PageViewMetricCollector.tsx diff --git a/src/metrics/PageViewMetricCollector.tsx b/src/metrics/PageViewMetricCollector.tsx deleted file mode 100644 index b55d0442..00000000 --- a/src/metrics/PageViewMetricCollector.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React, { useEffect } from 'react'; -import { useLocation } from 'react-router-dom'; - -import { loggSidevisning } from './amplitude-utils'; - -export const PageViewMetricCollector = (): React.ReactElement | null => { - const location = useLocation(); - - useEffect(() => { - loggSidevisning(location.pathname); - }, [location]); - - return null; -}; diff --git a/src/metrics/amplitude-utils.ts b/src/metrics/amplitude-utils.ts index 2d115dde..535a0158 100644 --- a/src/metrics/amplitude-utils.ts +++ b/src/metrics/amplitude-utils.ts @@ -33,10 +33,6 @@ export const logAmplitudeEvent = (eventName: string, data?: { [key: string]: Eve }); }; -export const loggSidevisning = (pathname: string): void => { - logAmplitudeEvent('sidevisning', { path: pathname }); -}; - export const loggKlikk = (eventType: string, verdi?: string, status?: string) => { logAmplitudeEvent('klikk', { eventType, verdi, status }); }; diff --git a/src/view/AppBody.tsx b/src/view/AppBody.tsx index 5372936e..e442b600 100644 --- a/src/view/AppBody.tsx +++ b/src/view/AppBody.tsx @@ -3,7 +3,6 @@ import { Outlet } from 'react-router'; import { v4 as uuidv4 } from 'uuid'; import loggEvent from '../felleskomponenter/logging'; -import { PageViewMetricCollector } from '../metrics/PageViewMetricCollector'; import { Bruker, OppfolgingData } from '../utils/Typer'; import { useUserInfoContext } from './BrukerProvider'; import { DialogHeader } from './dialog/DialogHeader'; @@ -63,7 +62,6 @@ const AppBody = () => { - );