From 9da752b41faa4db009eed9d511b9c1e31038dca0 Mon Sep 17 00:00:00 2001 From: bosco-ensemble Date: Mon, 8 Apr 2024 17:51:58 -0700 Subject: [PATCH] TDW-2277 moved fetchplaceholders call into the function --- scripts/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/scripts.js b/scripts/scripts.js index 9ce78dab..5bf99be3 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -10,8 +10,6 @@ * governing permissions and limitations under the License. */ -const placeholders = await fetchPlaceholders(); -const isProd = window.location.hostname.endsWith(placeholders.hostname); /** * log RUM if part of the sample. * @param {string} checkpoint identifies the checkpoint in funnel @@ -1198,6 +1196,8 @@ function getCookie(cookieName) { } async function loadAds(doc) { + const placeholders = await fetchPlaceholders(); + const isProd = window.location.hostname.endsWith(placeholders.hostname); if (!isProd === 'this') { // temporary override for analytics testing if (!localStorage.getItem('OptIn_PreviousPermissions')) localStorage.setItem('OptIn_PreviousPermissions', '{"aa":true,"mediaaa":true,"target":true,"ecid":true,"adcloud":true,"aam":true,"campaign":true,"livefyre":false}');