From 9645ee89722fe91e986db24edc18c82cc30f32ab Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Wed, 3 Apr 2024 11:57:14 -0400 Subject: [PATCH 1/2] Dont await martech --- scripts/delayed.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/delayed.js b/scripts/delayed.js index a1f80c5f..168bdd44 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -5,16 +5,16 @@ import { getEnvType } from './util.js'; // Core Web Vitals RUM collection sampleRUM('cwv'); -async function loadAdobeLaunch() { +function loadAdobeLaunch() { const adobedtmSrc = { dev: 'https://assets.adobedtm.com/2079c5a4620d/addee6043c9b/launch-EN41458ac9f88145ac942b876e3362c32f-development.min.js', preview: 'https://assets.adobedtm.com/2079c5a4620d/addee6043c9b/launch-EN367ab3c0970e43a0afba6d1110494ef4-staging.min.js', live: 'https://assets.adobedtm.com/2079c5a4620d/addee6043c9b/launch-EN8919423a46da4e859aad8cef6f514471.min.js', }; - await loadScript(adobedtmSrc[getEnvType()], { + loadScript(adobedtmSrc[getEnvType()], { type: 'text/javascript', async: true, }); } -if (!window.location.host.includes('localhost')) await loadAdobeLaunch(); +if (!window.location.host.includes('localhost')) loadAdobeLaunch(); From 6e45cf6a103b1857d50b00265b67bc88d9a9c004 Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Wed, 3 Apr 2024 11:58:41 -0400 Subject: [PATCH 2/2] Wait longer. --- scripts/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/scripts.js b/scripts/scripts.js index 3f1027ca..2bc96e4f 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -346,7 +346,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'), 4000); // load anything that can be postponed to the latest here }