Multi Homed Domain Tracking - Part I

In my first post, I would like to share a small code I have implemented to tweak the WebTrends client-side tag to cope with web sites that have multiple domain aliases.

While having multiple domain aliases for the same web site might jeopardize your ranking in search engine indexes, the problem on the WebTrends reporting is that the same page will be split over several domains and audience has to be consolidated manually.

In order to correct this, I did the following:

  1. Add a parameter in the dcsInit object in the wtinit.js file:

    function DcsInit(){
      ...
      this.repdom = "www.unique.com"; // reported domain will be forced to this host, no matter the real domain
      ...
    }
  2. Then go to the dcsVar() function in the file wtbase.js and add the following code

    if (dcsInit.repdom != ""){
      DCS.dcssip=dcsInit.repdom;
    }

    right after the line

    DCS.dcssip=window.location.hostname;

  3. Done.

This will force the DCS.dcssip parameter to the host you specified in the variable repdom (reported domain) and you will therefore have always the same domain in your reports.

This code is based on the wtinit.js/wtbase.js version of the base tag. However, the same logic should be applicable to previous/later versions.

Voilà!

VN:F [1.3.2_665]
Rating: 1.0/5 (1 vote cast)

Leave a Reply


SiteSensor Browser Pedia Collector