Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Incorporate JS Bugsnag Library #21

Open
mikebronner opened this issue Apr 14, 2017 · 10 comments
Open

Feature Request: Incorporate JS Bugsnag Library #21

mikebronner opened this issue Apr 14, 2017 · 10 comments
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature

Comments

@mikebronner
Copy link

Would love to see this plugin also inject the JS error handling, with a separate bugsnag API key for the JS bugsnag project (would of course require setup of two bugsnag projects).

This would dramatically ease the implementation of JS monitoring on Wordpress websites.

Thoughts?

@Cawllec
Copy link
Contributor

Cawllec commented Apr 16, 2018

Hi @mikebronner, sorry it's taken so long to get to this.

This is absolutely something that we can look into doing. I'll note back any progress here.

@Cawllec Cawllec added the feature request Request for a new feature label Apr 16, 2018
@mikebronner
Copy link
Author

Thanks, I'm still very much interested in this :)

@simplenotezy
Copy link

Me too, any updates?

@abigailbramble abigailbramble added the backlog We hope to fix this feature/bug in the future label Sep 24, 2019
@abigailbramble
Copy link

You can manually add the JS library to your site by following our JS integration guide. We are still considering building this into the Wordpress Plugin. We will provide updates when that happens but we do not have an ETA as yet.

@masteradhoc
Copy link

masteradhoc commented Jan 26, 2023

+1 would be amazing to get that into the plugin
@imjoehaines any idea if this could get worked on soon?

@luke-belton
Copy link
Member

Hi @masteradhoc - this is still on our product roadmap, but I don't currently have an ETA for when we might work on this. We'll make sure we keep this thread updated with any progress 👍

@masteradhoc
Copy link

@luke-belton Any update half a year later? :)

@johnkiely1
Copy link
Member

Hi @masteradhoc, unfortunately we don't have any updates to share. This is still on the backlog and we haven't had a chance to work on it yet.

@bhubbard
Copy link
Contributor

Can we get movement on this it really should not be that difficult, here is code:

 function bugsnag_enqueue_js() {
	wp_enqueue_script( 'bugsnag', 'https://d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js', array(), '7', true );
	wp_enqueue_script( 'bugsnag-performance', 'https://d2wy8f7a9ursnm.cloudfront.net/v2.1.0/bugsnag-performance.min.js', array('bugsnag'), '2.1.0', true ); // Performance JS File, Optional.
		wp_add_inline_script( 'bugsnag', 'Bugsnag.start({
  apiKey: \'API-KEY-GOES-HERE\'
})' );
 }
add_action( 'wp_enqueue_scripts', 'bugsnag_enqueue_js' );
add_action( 'admin_enqueue_scripts', 'bugsnag_enqueue_js' ); // Load on Admin Pages, Should be an option.

You can use wp_localize_script to send the API Key to the inline script code.

@mclack
Copy link

mclack commented Jan 2, 2024

Hi @bhubbard

We appreciate your patience here.

This is something that has been discussed internally, but a real integration would require a way to pass config between both of the notifiers, and this isn't currently something we're looking to directly support in the near future.

If you're keen to incorporate the current solution you have, then please feel free to make a new plugin that only pulls in bugsnag-js. Or you could fork the repo, apply the change and follow the manual instructions for installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

9 participants