Setting TrackingServer to Data Element
Hello,
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:
if(window.location.href.indexOf(".domain1.com") != -1)
{s.trackingServerSecure="smetrics.domain1.com"}
if(window.location.href.indexOf("domain2.com") != -1)
{s.trackingServerSecure="smetrics.domain2.com"}
Pretty sure this is wrong because I shouldn't be setting the s.trackignServer in the custom script. Would appreciate any help!
