From 07fcd1c22959a240b0d8dd39d5bf9730df3b478b Mon Sep 17 00:00:00 2001 From: voggenauerm Date: Tue, 12 Dec 2023 10:49:47 +0100 Subject: [PATCH] SPIN-126 // Adjust the script delays --- scripts/delayed.js | 4 +++- scripts/scripts.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/delayed.js b/scripts/delayed.js index f3f6979..f098110 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -6,7 +6,9 @@ import { initializeHubspot } from '../blocks/form/form.js'; // Core Web Vitals RUM collection sampleRUM('cwv'); injectStarsLayers(); -initializeHubspot(); +setTimeout(() => { + initializeHubspot(); +}, 2000); /* IMPORTANT: this is just for fun and not actually used. Please ignore this :) */ let lastKeys = ''; diff --git a/scripts/scripts.js b/scripts/scripts.js index a6857a8..8093a56 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -227,7 +227,7 @@ async function loadLazy(doc) { */ function loadDelayed() { // eslint-disable-next-line import/no-cycle - window.setTimeout(() => import('./delayed.js'), 3000); + window.setTimeout(() => import('./delayed.js'), 2000); // load anything that can be postponed to the latest here }