Configuring Cookie Expiration

With Webtrends v7.5 and higher, the first-party cookie set by the JavaScript tag is configured to expire in 10 years. To change the expiration, modify the time value parameter in the statement.

  1. In the left pane, click Administration > Application Settings > Data Sources.
  2. Edit the data source.
  3. Click SmartSource Data Collector.
  4. Edit the following line from the JavaScript tag text box:
    var dExp=new Date(dCur.getTime()+315360000000);
  5. 315360000000 represents the total number of milliseconds in 10 years. Change this value to the number of milliseconds from the current time until the time that you want the cookie to expire. For example, if you want the cookie to expire in 60 days, then change this value to 5183940000 = 60 (days) * 24 (hrs per day) * 60 (minutes per hour) * 60 (seconds per minute) * 1000 (milliseconds per second.).
  6. Implement the modified tag, replacing the existing tags on your pages, and redeploy the updated pages to your website.