How to use the react-ga.exception function in react-ga

To help you get started, we’ve selected a few react-ga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / react-ga / react-ga-tests.ts View on Github external
it("Able to make exception calls", () => {
        const fieldObject: ga.FieldsObject = {
            page: '/users'
        };
        ga.exception(fieldObject);
    });
    it("Able to make plugin object calls", () => {
github jaegertracing / jaeger-ui / packages / jaeger-ui / src / utils / tracking / index.tsx View on Github external
export function trackError(description: string) {
  if (isGaEnabled) {
    let msg = description;
    if (!/^jaeger/i.test(msg)) {
      msg = `jaeger/${msg}`;
    }
    msg = msg.slice(0, 149);
    ReactGA.exception({ description: msg, fatal: false });
    if (isDebugMode) {
      logTrackingCalls();
    }
  }
}
github jaegertracing / jaeger-ui / src / utils / tracking / index.js View on Github external
export function trackError(description: string) {
  if (isGaEnabled) {
    let msg = description;
    if (!/^jaeger/i.test(msg)) {
      msg = `jaeger/${msg}`;
    }
    msg = msg.slice(0, 149);
    ReactGA.exception({ description: msg, fatal: false });
    if (isDebugMode) {
      logTrackingCalls();
    }
  }
}
github pastelsky / bundlephobia / pages / compare / ComparePage.js View on Github external
.catch(err => {
        this.setState({
          resultsError: err,
          resultsPromiseState: 'rejected',
        })
        console.error(err)

        Analytics.event({
          category: 'Search',
          action: 'Search Failure',
          label: packageString.replace(/@/g, '[at]'),
        })

        Analytics.exception({
          description: err.error ? err.error.code : err.toString(),
        })
      })
  }
github atanasster / grommet-dashboard / components / ga / analytics.js View on Github external
export const logException = (description = '', fatal = false) => {
  if (description) {
    ReactGA.exception({ description, fatal });
  }
};
github qlik-oss / catwalk / src / components / error-reporting.jsx View on Github external
const sendException = (event) => {
  let message;

  if (event.type === 'unhandledrejection') {
    message = `UNHANDLED REJECTION: ${JSON.stringify(event.reason, Object.getOwnPropertyNames(event.reason))}`;
  } else {
    message = `ERROR: ${JSON.stringify(event, Object.getOwnPropertyNames(event))}`;
  }

  ReactGA.exception({
    description: message,
  });
};
github pastelsky / bundlephobia / pages / scan / Scan.js View on Github external
showInvalidFileError() {
    alert('Could not parse the `package.json` file.')

    Analytics.exception({
      description: 'Could not parse the `package.json` file',
    })
  }
github chantastic / sites / modules / analytics.js View on Github external
export const logException = (description = '', fatal = false) => {
  if (description) {
    ReactGA.exception({ description, fatal })
  }
}
github pairhub / pairhub / ui / lib / analytics.js View on Github external
export const logException = (description = "", fatal = false) => {
  if (description) {
    ReactGA.exception({ description, fatal });
  }
};