This should do the trick for you. Jut add it to a JS extension scoped to All Tags.
Just curious, is there a specific need for this?
Yes, there is.
Currently we print out the latest Tealium version in browser log like this:
cxTagLogger("Tealium Version - ##UTVERSION##")
So would be even better if it can print out the Tealium Environment as well for diagnose purpose.
Plus, we'd like to switch the Client ID of different tools(which is configured using JS Extension) using Tealium Environment instead of the actual running environment of the website itself.
I have tried all workaround to do the detection, but the ENV variable appeared rather lately...
Ultimately we'd like to switch the Client IDs(especially Optimizely project ID) base on the Tealium environment instead of the actual running environment.
Is there any way to have the server generated values in the sync.js & utag.js? e.g. ##UTENV## or ##UTPATH##