Page flicker can occur when client-side customizations are applied after the browser has already started loading the original page. Visitors may briefly see the non-customized version before the personalized version appear
Recommended Solution
Use the preTag script to reduce flicker. The script temporarily hides the page body while the Demandbase tag and Site Customization experience load.
The page becomes visible when either:
- The customization loads successfully, or
- The configured timeout is reached.
Place the preTag script as close to the top of the page as possible so the customization can load early.
Timeout setting
The final value, 3000, is the maximum hiding time in milliseconds.
In this example:
3000= 3 seconds- If the customization has not loaded after 3 seconds, the non-customized page appears
Set this value to the maximum perceived load time you want visitors to experience.
(function (d, b, a, s, e, hd) {
var t = b.createElement(a),
fs = b.getElementsByTagName(a)[0];
t.async = 1;
t.id = e;
t.src = s;
t.setAttribute('hidingTime', hd)
fs.parentNode.insertBefore(t, fs);
})
(window, document, 'script', 'https://tag.demandbase.com/pretag.min.js',
'demandbase_js_pretag_lib', 3000);