calibreapp/react-live-chat-loader

[Feature Request] Hide button from frontend if ad-blocker is enabled

dawsbot opened this issue · 3 comments

What problem would this feature solve?

If you're a user with an ad-blocker, the chat button click does nothing.

Describe the solution you’d like to see

Hide the chat button entirely if the user is using an ad-blocker

Describe alternatives you’ve considered

Hosting the embed script on another domain under a different name in-order to avoid the ad-blocker altogether. This was thrown out because of user privacy.

Additional context

In-case you'd like to read the HelpScout section about ad-blocking: https://docs.helpscout.com/article/911-beacon-and-ad-blockers

Hey @dawsbot, thanks for logging.

As I see it, this isn't something that we're able to implement as it would mean intentionally adding ad-like CSS classes to the faux chat buttons so that they're potentially hidden by adblockers.

The problem with this approach, is that we may unintentionally hide a live chat button, regardless of whether it would be blocked or not.

Of course, you may be able to experiment with wrapping the facade button with classes to explore how this may work in practice without making changes to react-live-chat loader. Perhaps you could run a trial and report back with your findings?

For now I'll close off this issue, but if there's any further updates please feel free to keep posting on this issue so they're captured 👍

Hi @benschwarz I solved this by using https://ghub.io/adblock-detect-react

const adBlockDetected = useDetectAdBlock();

return (
    {!adBlockDetected ? (<HelpScout .../>) : null}
)

Currently live to 50+ simultaneous users at a time on https://earni.fi

Great, thanks for posting your solution @dawsbot