libraries/tracking-core/helpers/optOut.js
function setCookie(optOutState) {
  switch (optOutState) {
    case true:
      document.cookie = `${disableStr}=true; expires=Thu, 18 Jan 2038 03:13:59 UTC; path=/`;
      window[disableStr] = true;
      break;

    case false:
      document.cookie = `${disableStr}=false; expires=Thu, 01 Jan 1970 00:00:01 UTC; path=/`;
      window[disableStr] = false;
      break;

    default:
      console.warn('setCookie for outOut invalid param optOutState. Param must be boolean');
      return false;
  }

  return true;
}
function setCookie(optOutState) {
  switch (optOutState) {
    case true:
      document.cookie = `${disableStr}=true; expires=Thu, 18 Jan 2038 03:13:59 UTC; path=/`;
      window[disableStr] = true;
      break;

    case false:
      document.cookie = `${disableStr}=false; expires=Thu, 01 Jan 1970 00:00:01 UTC; path=/`;
      window[disableStr] = false;
      break;

    default:
      console.warn('setCookie for outOut invalid param optOutState. Param must be boolean');
      return false;
  }

  return true;
}
function setCookie ( optOutState ) { switch ( optOutState ) { case true : document . cookie = ` ${ disableStr } ` ; window [ disableStr ] = true ; break ; case false : document . cookie = ` ${ disableStr } ` ; window [ disableStr ] = false ; break ; default : console . warn ( 'setCookie for outOut invalid param optOutState. Param must be boolean' ) ; return false ; } return true ; }
Sets opt out cookie
@param {boolean} optOutState true - user opted out of tracking, false - user did not opted out
@private
@returns {boolean} Info about the success
Sets opt out cookie