function trackAuthResult(success, errorCode = null) {
  // Set persistent dimensions
  const dimensions = {
    'Signup Result': success ? 'success' : 'error',
  };
  if (!success && errorCode !== null) {
    dimensions['Signup Error Code'] = errorCode.toString();
  }
  setDimensions(dimensions);

  // Track event with outcome as event label
  trackEvent('signup', 'result', success ? 'success' : 'error');
}
/**
 * Track authorization result
 *
 * @param {Bool} success
 * @param {Number} errorCode Optional code if error
 */
Track authorization result
@param {Bool} success
@param {Number} errorCode Optional code if error
Track authorization result @param { Bool } success @param { Number } errorCode Optional code if error
function trackAuthResult(success, errorCode = null) {
  const dimensions = {
    'Signup Result': success ? 'success' : 'error',
  };
  if (!success && errorCode !== null) {
    dimensions['Signup Error Code'] = errorCode.toString();
  }
  setDimensions(dimensions);
  trackEvent('signup', 'result', success ? 'success' : 'error');
}
function trackAuthResult ( success , errorCode = null ) { const dimensions = { 'Signup Result' : success ? 'success' : 'error' , } ; if ( ! success && errorCode !== null ) { dimensions [ 'Signup Error Code' ] = errorCode . toString ( ) ; } setDimensions ( dimensions ) ; trackEvent ( 'signup' , 'result' , success ? 'success' : 'error' ) ; }
Track authorization result
 @param {Bool} success
 @param {Number} errorCode Optional code if error
Track authorization result @param { Bool } success @param { Number } errorCode Optional code if error
// Set persistent dimensions // Track event with outcome as event label