Hello @Darren_Bowers
Like you mentioned for some cases you want to change the Click formula from "/t" to "/web".
You can find the domains and then tell the click formula to assign them different URLs and other URLs will remain the same.
Right now I am hard coding the domains but in the production, you may want to set the options to hold the list of domains.
Here the code.
var pattern = new RegExp("(YOUR_DOMAIN\.com|YOUR_DOMAIN2\.com)", 'i')
if( $(urlstring).match(pattern)) {
//Click Formula HEre
<% if( typeof strPurlTrackingServer!="undefined" && strPurlTrackingServer.toString() ) { %><%= strPurlTrackingServer %><% } else { %><%@ include option='NmsTracking_ServerUrl' %><% } %>/web/?id=<%=
type.substr(0, 1) + (message.id<0 ? (message.id+4294967296) : message.id).toString(16).toLowerCase()
%>,<%@ value object="delivery" xpath="@idTracking" %>,<%= escapeUrl("$(urlId)") %><%
if (document.mode == "forward")
{
var d = message.getParameter("d")
if( d )
d = d.split(",")
%>&ap_visitorId=<%=message.getParameter("visitorId") != '' ? message.getParameter("visitorId"):0 %>&ap_category=<%= d[0]?d[0]:'' %>&ap_deliveryId=<%=d[1]?parseInt(d[1],16):0%><%
} %><%
if( typeof proposition != "undefined" && proposition.length == undefined )
{ %>&ap_oid=<%= proposition.offer.id %><%
} %>
}else{
//Click Formula HEre
<% if( typeof strPurlTrackingServer!="undefined" && strPurlTrackingServer.toString() ) { %><%= strPurlTrackingServer %><% } else { %><%@ include option='NmsTracking_ServerUrl' %><% } %>/web/?id=<%=
type.substr(0, 1) + (message.id<0 ? (message.id+4294967296) : message.id).toString(16).toLowerCase()
%>,<%@ value object="delivery" xpath="@idTracking" %>,<%= escapeUrl("$(urlId)") %><%
if (document.mode == "forward")
{
var d = message.getParameter("d")
if( d )
d = d.split(",")
%>&ap_visitorId=<%=message.getParameter("visitorId") != '' ? message.getParameter("visitorId"):0 %>&ap_category=<%= d[0]?d[0]:'' %>&ap_deliveryId=<%=d[1]?parseInt(d[1],16):0%><%
} %><%
if( typeof proposition != "undefined" && proposition.length == undefined )
{ %>&ap_oid=<%= proposition.offer.id %><%
} %>
}
In the first link, we are adding the URLs where we want to change the domain. With the help of regex, we are filtering the domain and then adding the click formula with "/web" URL and for others, the URL will remain the same ie "/t".
With this change, you will have the new URLs with "/web" But they won't and will throw 404 error because the tracking server is not configured to accept the "/web" route. You will have to work with Adobe to add "/web" route to your tracking server and make it work.
Let me know if that helps.