You should be able to accomplish your use case in DTM. For example, you could use a page load rule with conditional logic to ensure the user is on the correct domain before firing the tag. You could also have a page load rule that fires regardless of which domain the user is on but dynamically injects a value into the tag. This approach would require a bit of custom coding in the custom section of your rule though.
I have a different JS code for 10 different web pages and when user goes to a particular page AMO tag has to fire with the custom page value(dynamic) in URL. for example URL looks like : rt://evertech.//// page value///