From bbb21818a1d5f5e362a4d79c8ebd49d00f4b4a33 Mon Sep 17 00:00:00 2001 From: Tomasz Subik Date: Tue, 19 Nov 2024 16:30:10 +0100 Subject: [PATCH] preconnect to 3rd party domains --- pages/_document.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pages/_document.js b/pages/_document.js index e612f3d4..113b1d56 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -15,12 +15,19 @@ class MyDocument extends Document { render() { const { language } = this.props; + const withOsano = !!process.env.OSANO_ID; + const withGTM = !!process.env.GOOGLE_TAG_MANAGER_KEY; + const withHotjar = process.env.DISABLE_HOTJAR !== 'true' && process.env.ENV === 'production'; return ( - + + {withOsano && } + {withGTM && } + {withHotjar && } + - {process.env.OSANO_ID &&