Methods for Generating First-Party Cookies

You can generate first-party cookies that Webtrends can use to track visitor sessions using one of several methods.

Methods include:

Using the Webtrends JavaScript Tag

If you use Webtrends Analytics 9 or Webtrends software with SDC, your best choice for generating first-party cookies is by allowing your JavaScript tag to generate them. By default, the JavaScript tag generates the first-party cookie and passes it in the query string as the WT.co_f query parameter. With this method, you do not need to configure your web server to generate cookies.

Using Your Web Server to Generate Cookies

Most modern web servers contain functionality for serving cookies. If your web server is already configured to serve cookies, you should use this cookie to identify your visitors. This method is suitable whether you use Webtrends software or Webtrends Analytics 9.

This section describes how some commonly used web servers deliver cookies.

Apache Web Server

Apache provides the mod_usertrack module for click stream logging of visitor activity on a site. Mod_usertrack sets a cookie with a unique identifier. Enable by adding this dynamically shared object to the LoadModule list, and setting the “CookieTracking on” directive in the httpd.conf file. The following directives provide additional control: CookieDomain, CookieExpires, CookieName, CookieStyle.

For more information, see

Microsoft Internet Information Server (IIS)


iPlanet/SunOne’s servlet engine supports Java Server Pages. You can manage your own tracking cookie by using the Cookie class and the HttpServletResponse.addCookie method, and the HttpServletRequest.getCookies method.

For more information, see

Using the Webtrends Cookie Plug-in

The Webtrends Cookie Plug-in is software that you can install on your web server to generate first-party cookies. If your web server cannot be configured to serve cookies, and you use Webtrends software without SDC, this is your best choice for generating first-party cookies.

The Cookie Plug-in supports Apache, Microsoft IIS, and iPlanet/SunOne web servers. For more information, see the Cookie Plug-in User’s Guide.