How to inject content into `before-script-load`?

Thank you @Lilly, @Falco and @pfaffman.

I believe this is my main problem.

As an example, I need to make sure the dataLayer object I set is always added to page before any other script, if possible. Especially before GTM loads (either via builtin, or a custom loader).

On my local development box, I tried utilizing the initializes, pre-initializers, and the head_tag.html template;
And inside head_tag.html template, I tried wrapping my code with <script></script> and the <script type="text/discourse-plugin" version="0.1"></script> tags.

With each one I can see the bootstrapping order relative to each other. But other than this, I don’t seem to have control over the order of the scripts loaded.