We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How is the Experience cookie set?

The Experience cookie _xbc is set by JavaScript:

var options = {
  path: '/',
  expires: 730
};
if (util.__protected__.isHttpsProtocol()) {
  options.samesite = 'none';
  options.secure = true;
}
if (data.xbc.cookie_domain && data.xbc.cookie_domain !== 'localhost') {
  options.domain = data.xbc.cookie_domain;  util.__protected__.deleteTLDCookieForSpecificDomains(XB_COOKIE, data.xbc.cookie_domain);
}
util.deleteCookie(XB_COOKIE);
util.__protected__.setCookie(XB_COOKIE, data.xbc.cookie_value, options);

Last updated: