We have a pre-loader that sets of our data collection libraries. I'd like to load a specific tag once some other setup code fires, which I am able to do via:
but how can I wait to continue my pre-loader until that tag fully loads?
Is there any way to do an onload event listener for the tag?
If you need to wait until a tag is fully loaded before executing code I would recommend using a custom container and use a loader callback function. There is a good article on how to implement this here:
Specifically I would refer to section 6. This outlines how to specify the code to run after the script has been fully loaded.