Tracking PHP and JS errors (Wordpress)

Hi,

I’m using the unofficial Sentry plugin for Wordpress to track errors on a site.

The PHP errors are coming through perfect, but I’m not getting any Javascript errors. How can I capture both PHP and JS errors?


Brandon

Take the code of the bundle and the initialization and put in the header, using “add scripts to header and footer” plugin. https://wordpress.org/plugins/header-and-footer-scripts

Added something like this:

<script
  src="https://browser.sentry-cdn.com/5.20.1/bundle.min.js"
  integrity="sha384-O8HdAJg1..."
  crossorigin="anonymous">
</script>
<script>
Sentry.init({ dsn: 'https://unique@unique' });
</script>