Can we defer the adobe launch script added in the header of the our website. | Community
Skip to main content
July 7, 2022
Solved

Can we defer the adobe launch script added in the header of the our website.

  • July 7, 2022
  • 2 replies
  • 2034 views

Hi,

 

I wanted to understand if its absolutely necessary to load adobe launch script asynchronously or we can defer it.

What would be the impact if we defer the script.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

You can make the Launch script load synchronously by removing the "async" attribute in the <script> tag. But by doing so, you lose all of the benefits of asynchronous code execution within the Launch library, e.g. all actions in a Rule will run synchronously. Make sure that that is your intended result too.

2 replies

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
July 8, 2022

You can make the Launch script load synchronously by removing the "async" attribute in the <script> tag. But by doing so, you lose all of the benefits of asynchronous code execution within the Launch library, e.g. all actions in a Rule will run synchronously. Make sure that that is your intended result too.

Stewart_Schilling
Community Advisor
Community Advisor
July 12, 2022

According to Andrey, you should not use the "defer" attribute in the Launch embed script tag. See here: https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/adobe-launch-async-javascript-differing/td-p/371879