dcsimg

Why is there a question mark and parameter in my report as a value?

Products

Webtrends Analytics 9.x
Webtrends Analytics 8.x

Cause

When viewing reports, the value for one or more dimensions shows a question mark followed by another parameter and value. For example:

15?Param=Bad

Resolution

There are 3 basic parts of a URL. The first is the domain name such as www.domain.com. The second is the uri-stem and usually consists of a folder and page such as /folder1/page.aspx. The third portion of the URL is the query string. This is where parameters and values reside. Between the uri-stem and query string is a question mark. Between each subsequent query parameter is an ampersand. For example:

www.domain.com/folder1/page.aspx?Page=1&locale=en-us

Webtrends passes each of these parts of a URL to the SDC in individual parameters. Under normal circumstances, query parameters from the URL are placed into the value of the parameter “dcsqry”. Webtrends parameters are added to the log in the same field. In the log file the values are separated out like this:

www.domain.com GET /folder1/page.aspx Page=1&locale=en-us&WT.tz=-8&WT.ti=TitleOfPage…

The space between the “page.aspx” and “Page=1” is automatically interpreted as a ? in the analysis. There should only be one question mark in the URL. If these query parameters are instead passed as part of the value for dcsuri (the uri-stem) then the log files will place them into the uri-stem field of the file. This would cause the log to look similar to:

www.domain.com GET /folder1/page.aspx?Page=1&locale=en-us WT.tz=-8&WT.ti=TitleOfPage…

In this case, the space between locale=en-us and WT.tz will also automatically be interpreted as a ? in the analysis. The resulting URL now has two questions marks in it:

www.domain.com/folder1/page.aspx?Page=1&locale=en-us?WT.tz=-8&WT.ti=TitleOfPage…

When Webtrends analyzes this line in the log file, the first question mark is read as the start of the query string. The second question mark is now interpreted as part of the value for the previous parameter. This value contains all the characters of the previous equals sign up to the next ampersand. In the example URL above, the parameter “locale” now has a value of:

en-us?WT.tz=-8

Usually this error is due to the improper formatting of a dcsMultiTrack event coded on a link in the page. Instead of placing each parameter into its own field in the code, the parameters were added to the uri stem and resulted in this error. For example:

“dcsMultiTrack(‘dcssip’,’www.domain.com’,’dcsuri’,’/folder1/page.aspx?Page=1&locale=en-us’);”

To code this page in dcsMultiTrack correctly, each parameter should be split out separately similar to:

“dcsMultiTrack(‘dcssip’,’www.domain.com’,’dcsuri’,’/folder1/page.aspx’,’Page’,’1′,’locale’,’en-us’);”