How to ensure the SharePoint tag doesn’t double escape search phrases


Webtrends Analytics 9.x


By default, the SharePoint tag takes any on site search phrase from the URL by referencing the “k” parameter and assigning it to WT.oss. As it is pulling from the URL, this is URL encoded by default. As all parameter values are URL encoded prior to being sent to the SmartSource Data Collector, this will effectively double-encode the search phrase.


To correct this, the following code change needs to be made:

trackObject.argsa.push(“WT.oss”, osst[1]);

And change to:
trackObject.argsa.push(“WT.oss”, unescape(osst[1]));
This should not pass data with only single URL encoding.