Load a tag after another tag has finished loading

Bronze Contributor
Bronze Contributor

What would be the best strategy to load one tag after the loading of a specific other tag is finished.
We also have other tags and all of them are loaded asynchonously. We already tried setting the both tags in question to synchronous loading but it resulted in a white website that did not load at all.
Are there any better options to achieve this?

The first tag sets a global window variable when finished loading. I tried to use it as Loading rule for the other tag (as JS Variable --> is defined) but it did not get triggered. I assume because the process of Loading Rules then is already finished and not evaluated again?

2 REPLIES 2

Load a tag after another tag has finished loading

Bronze Contributor
Bronze Contributor

After the load order, the placement of tag determines the order in which the tags are fired. For example if you have 2 tags that are prioritized and loading async reorder the tag using the load order feature, drag and drop the tag in the order I'm which they need to be triggered. Hope this helps!

SU

Load a tag after another tag has finished loading

Bronze Contributor
Bronze Contributor

Thank you for the reply.
The problem is because of the asynchronous loading, we can't be sure that the one tag has finished loading when the other one is fired. So we need to prevent the one tag from loading until the other one has finished

Public