libraries/tracking-core/helpers/optOut.js
function isOptOut() {
  // Check cookie first
  let optOutState = getCookie();

  // No cookie info, check localStorage
  if (optOutState === null) {
    optOutState = getLocalStorage();
  }

  // No localStorage, we get default value
  if (optOutState === null || typeof optOutState === 'undefined') {
    optOutState = false;
  }

  // Set global for the environment
  window[disableStr] = optOutState;

  return optOutState;
}
function isOptOut() {
  // Check cookie first
  let optOutState = getCookie();

  // No cookie info, check localStorage
  if (optOutState === null) {
    optOutState = getLocalStorage();
  }

  // No localStorage, we get default value
  if (optOutState === null || typeof optOutState === 'undefined') {
    optOutState = false;
  }

  // Set global for the environment
  window[disableStr] = optOutState;

  return optOutState;
}
function isOptOut ( ) { // Check cookie first let optOutState = getCookie ( ) ; // No cookie info, check localStorage if ( optOutState === null ) { optOutState = getLocalStorage ( ) ; } // No localStorage, we get default value if ( optOutState === null || typeof optOutState === 'undefined' ) { optOutState = false ; } // Set global for the environment window [ disableStr ] = optOutState ; return optOutState ; }
Check if the opt-out state is set

Cookie is privileged.

@returns {boolean} Information if the user opt out
Check if the opt - out state is set