Find Your Family Vacation
Find Your Family Vacation
// URL: {fvc-home}/wp-content/themes/fvc/react/public/compare-prices.app.js const script = document.createElement('script'); script.src = JSON.parse(xhr.responseText) script.type = 'text/javascript' document.body.appendChild(script) } else { console.error('Error:', xhr.statusText); } } }; xhr.send(JSON.stringify(data)); } // NOTE: we will get rid of this query param after experiment const [delayKey, timeOutValue] = window.location.search.substring(1).split('&')[0].split('='); const timeToDelay = (delayKey === 'delay' && timeOutValue) ? parseInt(timeOutValue, 10) : 2000; window.stshared_ads_manager.initAds(); window.addEventListener('load', function () { setTimeout(() => { window.dataLayer.push({event: 'pageReady'}) }, timeToDelay) }); // After scroll, load below the fold components window.addEventListener('scroll', function () { comparePriceLazyLoad('GET', 'https://www.familyvacationcritic.com/wp-json/compare-price-loader/v1/load', {}) }, {once: true});