Adobe Experience Platform Launch has been rebranded as a suite of data collection technologies in Adobe Experience Platform. Several terminology changes have rolled out across the product documentation as a result. Please refer to the following document for a consolidated reference of the terminology changes.
Often, libraries are loaded synchronously in the
<head> tag of a page. For example:
If the parser comes across the
Tag management libraries can quickly grow large if you have a lot of tags to manage.
You can load any library asynchronously by adding an
async attribute to the
<script> tag. For example:
<script src="example.js" async></script>
As described above, in synchronous deployments, the browser pauses parsing and rendering the page while the Adobe Experience Platform tag library is loaded and executed. In asynchronous deployments, on the other hand, the browser continues parsing and rendering the page while the library loads. The variability of when the tag library might finish loading in relation to page parsing and rendering must be taken into consideration.
First, because the tag library can finish loading before or after the bottom of the page has been parsed and executed, you should no longer call
_satellite.pageBottom() from your page code (
_satellite won’t be available until after the library has loaded). This is explained in Loading the tags embed code asynchronously.
Second, the tag library can finish loading before or after the
DOMContentLoaded browser event (DOM Ready) has occurred.
Because of these two points, it’s worth demonstrating how the Library Loaded, Page Bottom, DOM Ready, and Window Loaded event types from the Core extension function when loading a tag library asynchronously.
If your tag property contains the following four rules:
Regardless of when the tag library finishes loading, all the rules are guaranteed to be executed and they will be executed in the following order:
Rule A → Rule B → Rule C → Rule D
Although the order is always enforced, some rules might be executed immediately when the tag library finishes loading, while others might be executed later. The following occurs when the tag library finishes loading:
DOMContentLoadedbrowser event (DOM Ready) has already occurred, Rule B and Rule C are executed immediately. Otherwise, Rule B and Rule C are executed later when the
DOMContentLoadedbrowser event occurs.
loadbrowser event (Window Loaded) has already occurred, Rule D is executed immediately. Otherwise, Rule D will be executed later when the
loadbrowser event occurs. Note that if you’ve installed the tag library according to the instructions, the tag library always finishes loading before the
loadbrowser event occurs.
When applying these principles to your own website, consider the following:
If you see things occurring out of order, it is likely that you have some timing issues to work through. Deployments requiring precise timing might need to use event listeners and the Custom Event or Direct Call event type to make their implementations more robust and consistent.
Tags provide a toggle to turn on asynchronous loading when creating an embed code when you configure an environment. You can also configure asynchronous loading yourself:
Add an async attribute to the
<script> tag to load the script asynchronously.
For the tags embed code, that means changing this:
<script src="//www.yoururl.com/launch-EN1a3807879cfd4acdc492427deca6c74e.min.js" async></script>
Remove any code you may have previously added at the bottom of your tag:
This code tells Platform that the browser parser has reached the bottom of the page. It is likely that tags will not have loaded and executed before this time, therefore calling
_satellite.pageBottom() results in an error and the Page Bottom event type may not behave as expected.