Ingenovis Health has multiple brands, including:
The client wanted to use link decoration (adding query parameters to URLs from a given domain) to retain attribution data across these domains, while also recording the referring domain. In other words, if a user started a paid search session on Fastaff, and then clicked a link to Vital Solution, the attribution information should remain paid search, but it should also be clear that they came from Fastaff. By default, however, our link decoration only retains attribution information, without mentioning the domain the user came from.
The regular link decoration code looks like this:
var subdomains = 'https://cart.thomasnet-navigator.com/';
setInterval(function() {
mcfx('decorate', subdomains);
}, 1000);
The second parameter in the mcfx() call can accept either a string or an array of strings.
Knowing this, we can create an array of each of the domains to decorate, and use the mcfx() function to decorate them at an interval of once every second. Here’s what’s running on ingenovishealth.com:
var subdomains = ['trustaff.com','fastaff.com','usnursing.com','vitalsolution.com','vistastaff.com'];
setInterval(function() { mcfx('decorate', subdomains); }, 1000);
Actually, if you’re interested, this code can be improved upon so that you only need to copy and paste one version of the code across each site by looking up window.location.hostname, removing the www., and removing it from the array if any element matches it.
Of course, this only gives us the attribution information. To add the referring domain, we’ll need to use the utm_content parameter. We can do something very similar to the above code to achieve this effect:
setInterval(function(){
var links = document.querySelectorAll('a[href]');
links.forEach(function(link){
var searchParams = new URLSearchParams(link.search);
if(searchParams.has('fx_sid') && !searchParams.has('utm_content')){
var hostname = new URL(window.location.href).hostname.replaceAll('www.','').replaceAll('.com','');
link.href = link.href + '&utm_content=' + hostname;
}
})
}, 1000);
Decorated links across a network of branded domains so that we could record both original attribution data and referring domain.
