Skip to content

Add isProbablyUsingAdBlock() #15780

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

Closed
lforst opened this issue Mar 21, 2025 · 1 comment · Fixed by #15821
Closed

Add isProbablyUsingAdBlock() #15780

lforst opened this issue Mar 21, 2025 · 1 comment · Fixed by #15821
Assignees
Labels
Package: browser Issues related to the Sentry Browser SDK

Comments

@lforst
Copy link
Member

lforst commented Mar 21, 2025

Description

For the pages injected by the wizard it would be great to have a function that detects whether the user is using an ad blocker so we can tell them to disable the adblocker to try out Sentry.

@lforst lforst changed the title Add isProbablyUsingAdBlock Add isProbablyUsingAdBlock() Mar 21, 2025
@lforst lforst self-assigned this Mar 21, 2025
@AbhiPrasad AbhiPrasad added the Package: browser Issues related to the Sentry Browser SDK label Mar 21, 2025
lforst added a commit that referenced this issue Mar 25, 2025
…ically detect possible connectivity issues (#15821)

Resolves #15780

Adds a function `diagnoseSdkConnectivity` that will resolve to various
"error codes" for possible reasons why events might not land in Sentry.

Originally I wanted to add an API to detect ad blockers so we can show a
notification in the example pages that the wizard creates. Then I
quickly thought of a different case why the SDK might not send data so I
extended the API to also detect if the SDK wasn't initialized yet. We
can extend this function at any point if we come up with more cases.
Copy link
Contributor

A PR closing this issue has just been released 🚀

This issue was referenced by PR #15821, which was included in the 9.10.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK
Projects
None yet
2 participants