Expand my Community achievements bar.

SOLVED

Is it Safe to Use the Target Pre-Hiding Snippet Without Including the Target and Launch Scripts?

Avatar

Level 3

I'm planning to implement the Target pre-hiding snippet in the <head> of our production site using AEP Web SDK.

However, at this stage, I'm considering placing the pre-hiding snippet without including the Target script or the Launch script.

Is it advisable to place the Target pre-hiding snippet alone without the accompanying Target and Launch scripts? Will this impact or break the current user experience?

If there are potential issues, what would the impact be? If it's safe, how does it not affect the user experience?


CCing Top Contributors for quick response @prads  @kandersen @Gokul_Agiwal @alexbishop @Ryan_Roberts_ 

Thanks for the wonderful support!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @DhanA2 ,

I don't have any experience with sites having it implemented without Target or Launch. However, the script itself is not Target or Launch dependent, so it will execute regardless of Target being deployed or not.

The purpose of the script is:

  • Injects a style element that hides the body of the document by setting it’s opacity to 0
  • Adds a function that gets called after 3 seconds to remove to the style element. This is a fallback in incase the Adobe Target script fails or takes a longer than 3 seconds to reach the point where it would remove the style element.


As Target is not on the page your users will experience a blank page for 3 seconds, as Target is not in place to remove the style element. 

I would advise against deploying the script!

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @DhanA2 ,

I don't have any experience with sites having it implemented without Target or Launch. However, the script itself is not Target or Launch dependent, so it will execute regardless of Target being deployed or not.

The purpose of the script is:

  • Injects a style element that hides the body of the document by setting it’s opacity to 0
  • Adds a function that gets called after 3 seconds to remove to the style element. This is a fallback in incase the Adobe Target script fails or takes a longer than 3 seconds to reach the point where it would remove the style element.


As Target is not on the page your users will experience a blank page for 3 seconds, as Target is not in place to remove the style element. 

I would advise against deploying the script!

Avatar

Level 7

not clear what is the use case  here if you not using Target/Launch Script as pre -hiding snippet is specific to address flicker and user experience due to Target/Launch Script implementation.

 

Without Target/Launch Script, it would work but might hide content and you might need to think of writing the custom script to show content  @DhanA2 

Avatar

Level 5

@DhanA2 

 

The pre-hiding snippet is designed to hide content until Adobe Target has loaded. Its primary role is to prevent users from seeing default content before Target has a chance to deliver the appropriate experience.

 

As Target is not on the page your users will experience a blank page for seconds that you have defined. Users may experience a delay or flicker. 



Please let me know if this helps.

Thanks