Tag Builder - Cookie Domain Attribute

Description

The cookie domain attribute is used when creating the Webtrends First Party Cookie (FPC).

The FPC is set client-side using JavaScript as follows:
document.cookie="WT_FPC=id=VisitorID:lv=Timestamp:ss=Timestamp; expires=Date; path=/; domain=CookieDomainAttribute";

The cookie domain attribute must:

  • Begin with a dot and contain at least two dots
  • Tail match the domain portion of the page containing the JavaScript tag

Read more about cookies here.

Example

For example, suppose you specified the cookie domain attribute to be .webtrends.com and view the following two pages:

  1. www.webtrends.com/products.aspx
  2. ondemand.webtrends.com/login.asp

The first page view is considered a new visitor (WT.vt_f=1), and the FPC is set on the webtrends.com domain. The second page view uses the existing FPC and is considered a return visitor. This is because the domain of the second page view ondemand.webtrends.com tail matches the specified domain webtrends.com.

Note: If an invalid domain attribute is specified, then no FPC is set. Continuing with the example above, if you had specified the cookie domain attribute to be .myco.com and viewed the pages, the FPC would not be set. Both would be considered not accepting cookies (WT.vt_f=2).

JavaScript Reference

Class.PropertyType
WebTrends.fpcdomstring