Skip to content

Commit

Permalink
🔇 Removed amplitude logging (#3485)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Jan 1, 2025
1 parent ef5e671 commit 0480d78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions aksel.nav.no/website/components/logging/useAmplitude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const batchedEvents: Parameters<Pick<Types.BrowserClient, "track">["track"]>[] =
[];

export let amplitude: Pick<Types.BrowserClient, "init" | "track"> = {
track: (...eventsData) => {
batchedEvents.push(eventsData);
track: (/* ...eventsData */) => {
/* Until re-enabled in _app.tsx, we can skip storing events */
/* batchedEvents.push(eventsData); */
return {
promise: new Promise<Types.Result>((resolve) =>
resolve({
Expand Down
5 changes: 3 additions & 2 deletions aksel.nav.no/website/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { useEffect } from "react";
import { useCheckAuth } from "@/hooks/useCheckAuth";
import { useHashScroll } from "@/hooks/useHashScroll";
import { SanityDataContext } from "@/hooks/useSanityData";
import { useAmplitudeInit } from "@/logging";
import { BaseSEO } from "@/web/seo/BaseSEO";
import "../components/styles/index.css";

function App({ Component, pageProps, router }: AppProps) {
useHashScroll();
useAmplitudeInit();

/* As of 01.01.25, removed until cookie compliance is implemented */
/* useAmplitudeInit(); */

useEffect(() => {
window.location.host === "design.nav.no" &&
Expand Down

0 comments on commit 0480d78

Please sign in to comment.