Disable pre hiding snippet
Our devs have asked to disable the pre-hiding snippet. They do not have it implemented in the source code. How can I disable it through Adobe Launch? Below is the current implementation through custom code.


Our devs have asked to disable the pre-hiding snippet. They do not have it implemented in the source code. How can I disable it through Adobe Launch? Below is the current implementation through custom code.


Hello @xcode2295,
if there really isn't a pre-hiding snippet in the source code. Is it possibly via another rule in Adobe Experience Platform Launch that code is inserted on the page.
Basically a pre-hiding snippet is recommended when Adobe Target is loaded asynchronously. However, care must be taken here to ensure that it is only executed when Adobe Target is loaded. Not if e.g. a Consent was not yet given - which only enables the loading of Adobe Target.
Also as a note. The at.js has an additional pre-hidings snippet integrated. This is active as soon as the at.js script has been executed - until the first Adobe Target request has arrived - or a maximum of 3 seconds.
With the following code you can also interrupt/delete the pre-hiding snippet manually.
var preHidingSnippet = document.head.querySelector("#at-body-style");
if (preHidingSnippet !== null) document.head.removeChild(preHidingSnippet);
document.body.style.opacity = "1";
What I still notice is that you manually include the at.js here. What is also possible is to include Adobe Target via an extension - this is then at least two actions (Load Target and Fire Page Load Request) - with Fire Page Load Request you can also select Body Hiding Disabled (if that is desired).
Best regards
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.