How do I capture custom 400 and 500 return codes in SmartSource Data Collector log files?

How do I capture custom 400 and 500 return codes in SmartSource Data Collector log files?

For products
Webtrends On Demand
Webtrends Analytics 9.2x
Webtrends Analytics 8.x

Last modified: 1/1/2011

Situation:
A web site includes custom error pages but hits to the custom error pages count as successful page views, resulting in server error reports which display no content.

Solution:
This solution applies to customers using the On-Premises or OnDemand SmartSource Data Collector (SDC) as their logging server.

In the customer error page(s), in addition to the Webtrends JavaScript tag, add a line of code similar to the following:

<META name="DCS.dcssta" content="404"></META>;

In this example, when a hit is received on the page in question, the Webtrends tag will send a hit to the data collection server with an override for the sc-status field, assigning it a value of "404". For each custom error page, change the content parameter value to match the corresponding return code intended. After analysis of web logs containing these entries has completed, Webtrends' Errors reports will populate with data for the custom error page.

For multi-homed domain web servers, create new custom error files for each web site, then tag each one with the appropriate dcsid notated SDC tag to ensure the errors for each site will be added to the SDC logs specific to the site in question.