In Adobe DTM, we are trying to create a data element that returns a first party trackingserver based on the site domain. Ultimately, we want to set this data element in the trackingserver field of the Experience Cloud ID service tool in DTM. We need to do this as we host multiple domains in one DTM profile.
Can anyone give me some tips on how I would go about doing this? For example, we want trackingserver to be set to smetrics.domain1.com for domain1.com and smetrics.domain2.com for domain2.com.
Right now, I have a data element set up with the following custom script: