Hi Martin,
Not sure if you've already got a solution to this, but there is a beta utag.js available that contains the functionality you describe, and we are already using it for some clients. As Dan says, your account manager should be able to help you deploy the beta code if you're interested, though naturally it may be unstable as it's not in its final release state yet. We do have some clients with the code already in production, and so far we have not found any major problems; on the contrary it has solved exactly the problem you described and has made Tealium much more flexible for them.
Hope this helps you out,
Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.