Hi Siegert, thanks for your question.
A quick question, do you want to make sure the tag is loaded first or that the request the tag makes is made first?
The reason I ask is that the new utag.js will ensure that tags are loaded in order (and their requests will fire when ready) but they will fire their request as soon as they are ready.
So, by upgrading you can control the order in which the tags are loaded but they will make their requests whenever they are ready.
For example, if you have tag 1 loading first and tag 2 loading after, if tag 2 completes first it will fire its request before tag 1 has completed even though it was loaded after.
You can upgrade here:
You'll notice the new utag.js is a lot faster and you can read about it here:
If you want to make sure the actual request is made first I don't believe there is much we can do but hopefully this will meet your use case?
Actually what we want to do is next: there is still some hardcoded tags (GA, Chartbeat, ComScore, CIM) on the site, but because of the complexity of the site, we can not really identify on which pages the hardcoded tags are still present. Therefore we are writing a custom script that will detect the pages where the hardcoded tags are still on, and send this info to a logfile.
For GA, the script will focus on "_gat.bb", so this means that the GA tag via Tealium can not be triggered before our custom script has been activated and has run.
We will do a test by moving our custom script to the top of the list, and set the wait flag to No.
Ah. I see. In this case you could set your custom tag to have a 'wait flag' of 'no' in the advanced settings.
This way, your tag will fire before the DOM is ready (by default all tags wait until the DOM is ready before firing) so it should fire first.
Maybe give that a go?
If that doesn't work, as a workaround you could always run your tag as an extension scoped to 'Pre Loader'. This way, it's the first thing Tealium will run (even before load rules and extensions).
Maybe try that?