From 133cdbdec7645594c2ab4911e6b6b0dd24fad787 Mon Sep 17 00:00:00 2001 From: Remko Date: Fri, 22 Mar 2024 11:17:26 +0100 Subject: [PATCH] Added analytics to head --- pwa/gatsby-ssr.js | 16 +--------------- pwa/src/hooks/useEnvironment.ts | 3 --- pwa/src/layout/Head.tsx | 3 +++ 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/pwa/gatsby-ssr.js b/pwa/gatsby-ssr.js index b95076e0..9044ecc0 100644 --- a/pwa/gatsby-ssr.js +++ b/pwa/gatsby-ssr.js @@ -24,21 +24,7 @@ export const wrapRootElement = ({ element }) => { ); }; -export const onRenderBody = ({ setHeadComponents, setPostBodyComponents }) => { - const isBrowser = () => typeof window !== "undefined"; +export const onRenderBody = ({ setHeadComponents }) => { const HeadComponents = [Woo Website]; - const BodyComponents = [ - isBrowser() && window.sessionStorage.getItem("ANALYTICS_URL") ? ( -