If you have seen our installation guide, you probably remember that Unless's script needs to load in the <head> tag of your site, before any other elements load on the page and before your analytics scripts executes.
This is important to assure that Unless's variations are loaded correctly. 

To make sure that Unless loads and integrates correctly, you must make sure that Unless is able to finish loading before other tags on your page execute. This is known as synchronous loading (because all tags load synchronously, one after the other). There are two ways to ensure that this happens:

  • Load Unless  in the <head> tag of your page, outside of a tag manager (recommended)
  • Use a tag manager that supports synchronous loading such as Tealium or Ensighten (but not Google Tag Manager which only supports asynchronous loading)

Why does Unless need to be loaded synchronously? 

Because we apply visual changes to your website, Unless needs to load in the <head> tag, before other page elements load.

In general, asynchronous loading is executed in the <body>. If you tried to execute Unless there, it would cause a so-called flash of unstyled content.

Did this answer your question?