Cookies
Updated over a week ago

This document details cookies created by and used for Webtrends Optimize, specifically when using the Client API (CAPI) mechanism to run and serve experiments.

For the purposes of this document, we use "cookie" interchangeably with localstorage except where called out specifically.

Cookies we manage

The below are standard cookies created by the platform. We may create additional cookies or items to keep track of, depending on your use-case.

User

What does the User cookie do?

This is an encrypted persistent cookie. It is used to identify a user and their session. This information helps us to tie a user to their activity, which is essential for conversion tracking.

Example name of the User cookie

_wt.user-1908787

The structure of this cookie is

_wt.user-[YOUR ACCOUNT DOMAINID]

Example value of the User cookie

The value of this cookie is encrypted, and so if viewed in its raw format you'll see something like:

WT3zLURvgbOrd9DBJOrWqfSuHMNS0nfKISNIiNJzpq1d-_F468574DrkSdTSlToHoBjA7lbpgxIqVPJAg3Da89mGMwFgps301xlO39V3LQkps6WJgpoXNrKUhWZsoLoUNpa2Td8QJVEVBfLMklReAz-GmXLwjBN5iwv_NTPlAFFARQP3X8214ra91Nx5aiThNfRDyM894L2i1c~

The useful information stored in this cookie is:

  1. User ID - an anonymous, unique user ID for that website user.

  2. Session ID - an anonymous, unique session ID for that website user.

  3. Session start timestamp - when their session began.

Mode

What does the mode cookie do?

This is an encrypted session cookie. It is used to identify what User Mode users belong to - staging or normal. This is critical to the QA mechanism in the platform, known as Staging Mode.

Example name of the Mode cookie

_wt.mode-1908787

The structure of this cookie is

_wt.mode-[YOUR ACCOUNT DOMAINID]

Example value of the Mode cookie

The value of this cookie is encrypted, and so if viewed in its raw format you'll see something like:

WT3RzAoZZKALKg~

The information stored in this cookie is either "normal" or "staging".

Staging users are eligible for staging experiences, and normal includes all other users.

Project

Note: Settings in your tag allow this to be kept in localstorage instead of as a cookie for tag 5.8+.

What does the project cookie do?

This is a plain-text, persistent cookie. It tracks which experience and variation a user has been exposed to. This is required for "stickiness" - making sure the user is served the same variation across their journey. It also allows us to attribute their behaviour to a given variation.

It was created as an iteration of the control cookie - slimmer in size and more flexible in where it can be stored.

One of these cookies are created per-project you build.

Example name of the Project cookie

_wt.project-1908787-ta_WelcomeVideo

The structure of this cookie is

_wt.project-[YOUR ACCOUNT DOMAINID]-[PROJECT ALIAS]

Example value of the Project cookie

The value of this cookie will appear similar to:
โ€‹

1||88067-88074-88077||true||IN

The details included in this cookie are:

  • Experience type

  • Experience GUID

  • Pageview tracked / not

  • Throttle result and group.

Control

Note: This cookie has been superseded by the project cookie.

What does the control cookie do?

This is an encrypted, persistent cookie. It tracks which experience and variation a user has been exposed to. This is required for "stickiness" - making sure the user is served the same variation across their journey. It also allows us to attribute their behaviour to a given variation.

One of these cookies are created per-project you build.

Example name of the Control cookie

_wt.control-1908787-ta_WelcomeVideo

The structure of this cookie is

_wt.control-[YOUR ACCOUNT DOMAINID]-[PROJECT ALIAS]

Example value of the Control cookie

The value of this cookie is encrypted, and so if viewed in its raw format you'll see something like:

WT345uvXhEU2yG1qQN1kIYfyd73UyEKKFaAG0IEH1Pz5SZGsOeMvzNxlOb5tRhPO3gpWHLTNlMVctiL4dVnDHS33gFJok7lMiy2xdmaTNsaaj-rBsgiWinY5FmgkJyjSMx6NNjG9ioFfY3WIoNj7QxwRXsWOCVVTD22T39NAcHZxy8E2oH0HJR3aKaxaOa5mHcKaCJVlsjOrkjk3XOXlRIup0l_rq3IDZ4FbhG5tFkLDP_Xx05jTmdukTUMTYuNtmCP3DNOMolWLz86bopRnUp42cBDlzolS1QokqB164hCqD_YzkfYU_d7-bpNa8aynV8wEZ4yDOlTz0NmMSFKmZC00dD1zcuSmoTE5zVuOOURvdl_26lE-k8aXT3uui8~

The details included in this cookie are:

  • Experience type

  • Experience GUID

  • Pageview tracked / not

  • Throttle result and group.

JSESSIONID

What does the JSESSIONID cookie do?

This is a cookie that you'll find gets automatically set by many applications that run on Java. In our case, it is only used for load-balancing purposes - making sure that if you've reached one of our servers, we attempt to route you to the same one for subsequent communication with us.

The presence of this cookie is not essential to the running of Webtrends Optimize, and as such it will be written-out of the platform in the V6 tag, due to be released in late 2024.

Test History Cookie

What does the Test History cookie do?

This is a plain-text, persistent cookie. It is optional, and used for some customers who need an easy way to keep track of which experiments a user has seen, such that you can then run Mutual Exclusions.

Example name of the Test History cookie

_wt.testsHistory

Example value of the Test History cookie

ta_WelcomeVideo,ta_GuidedTour

The cookie stores a comma-separated list of project aliases that the user has been exposed to.

User-set cookies

As part of your experiment, particularly when creating personalised experiences, it may be useful to track additional behaviour.

It is normal to use cookies or localstorage for this. In this respect, Webtrends Optimize is just the vehicle for delivering Javascript to the page and cookies of any name and value can be delivered to the user.

Managing cookie scope

Duration

You'll find a cookie timeout value in the tag (global value):

This defaults to 90 days but can be adjusted as you wish.

This value affects how long users will be stuck to a given experience, and for how long we will attribute behaviour to a given user and the experience that they were shown.

Domain exposure

Test delivery can be controlled via Locations and Sites.

Domains will default to the subdomain listed in the Site object (without www.), but can be overwritten.

This can be controlled globally - simply put your desired domain into this variable, and save into the preinit section of your tag:

WT.optimizeModule.prototype.wtConfigObj.cookieDomain = "app.mysite.com";

Force deleting cookies

In the event of a disaster, you may wish to forcibly delete Webtrends Optimize cookies.

There are a few mechanisms available to do this:

Deploy code via. your Tag Manager (recommended)

document.cookie.match(/_wt.[^=]+/g).forEach(name => {
if(WT.optimizeModule.prototype.wtConfigObj.cookieDomain)
WT.helpers.cookie.set(name, "", -1, "/", WT.optimizeModule.prototype.wtConfigObj.cookieDomain || document.domain);
else
WT.helpers.cookie.del(name);
});

We recommend:

  1. Removing the wt.js tag from your website, or using the killswitch in Optimize to stop experiment delivery.

  2. Running this code on your machine when you have cookies, to ensure they get deleted. Cookies are variable in how they're created, and this does not always work.

  3. Pasting the code for immediate deployment into your tag manager.

The wt.js tag has a 24hr cache, and so we recommend using your tag manager for this reason.

Sitewide target

Another quick solution could be to create a sitewide target and use the following code to ensure all cookies are and remain deleted.

The above code could be used, but given cookies can be created post-pageload and the target would create cookies too, we would suggest running this on a setInterval.

var clearwtocookies = setInterval(function(){

document.cookie.match(/_wt.[^=]+/g).forEach(name => {
if(WT.optimizeModule.prototype.wtConfigObj.cookieDomain)
WT.helpers.cookie.set(name, "", -1, "/", WT.optimizeModule.prototype.wtConfigObj.cookieDomain || document.domain);
else
WT.helpers.cookie.del(name);
});

}, 2000);

This will run endlessly, but is a fairly light check and 2s is not too frequent to degrade user experience.

As above, you should make sure this works on your machine before deploying it to others, to make sure it solves the problem.

Did this answer your question?