Cookie domain in JS Tracker vs. collector

In the JS Tracker docs, it says:

If your website spans multiple subdomains e.g.
You will want to track user behaviour across all those subdomains, rather than within each individually. As a result, it is important that the domain for your first party cookies is set to ‘’ rather than ‘’. By doing so, any values that are stored on the cookie on one of subdomain will be accessible on all the others.

Set the cookie domain for the tracker instance using the cookieDomain field of the argmap. If this field is not set, the cookies will not be given a domain.

In the Clojure Collector docs, it says:

Setting the domain name can be useful if you want to make the cookie accessible to other applications on your domain. If we, for example, set up the collector on and did not set a domain name, the cookie will default to this domain. However, if we set it to in the Property Value against SP_DOMAIN property, that cookie will be accessible to other applications running on *

How do these two parameters effect one another? I’m confused because I thought the Clojure Collector only sets the 3rd party cookie, not the first party cookie, and the whole point of the third party cookie is to be domain-independent.

Hi @dweitzenfeld - the way to think of the two cookies is as follows:

  • The JS Tracker’s cookie is always tied to the domain on which the JavaScript is executing
  • The collector’s cookie is always tied to the domain which is serving the collector’s response

The terms “first-party” and “third-party” are borrowed from online advertising and they are not always helpful here. Here are a few scenarios that could help:

Multiple TLD ecommerce business

  • Rely on cross-domain linking and collector cookie for tracking
  • Collector cookie set to

Single TLD business

  •,, et al
  • Use JS Tracker cookie set to
  • Collector cookie adds no real value here (unless you start doing off-site tracking e.g. for conversion pixels)

Advertising or analytics widget

  • Runs on a whole network of sites
  • Use collector cookie set to
  • JS Tracker cookie adds no real value here
1 Like

Thanks @alex, this was very helpful.